Skip to content

WIP Avoid mutation during iteration bug in package object lazy open #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.13.x
Choose a base branch
from

Conversation

retronym
Copy link
Owner

Still working on a test case...

val toOpen = deferredOpen.toVector
for (sym <- toOpen) {
if (deferredOpen.remove(sym))
// CAREFUL -- this can mutate deferredOpen, hence the defensive code here!
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it add more symbols to deferredOpen that also need to be opened?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT it only removes them

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@retronym retronym force-pushed the bug/package-object-deferred branch 3 times, most recently from b26db93 to d1b5ea3 Compare May 20, 2025 06:07
Test for edge case with package objects load

Avoid mutation-during-iteration during package object initialization
@retronym retronym force-pushed the bug/package-object-deferred branch from d1b5ea3 to 4b5ec3e Compare May 20, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants