Skip to content

Drop Per-Run infrastructure in Definitions #6882

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

Closed
wants to merge 8 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 18, 2019

Definitions employed a combinations of design patterns and helper functions to ensure that symbols of members in Definitions would be automatically updated in resident compiler if the definition was edited.
I.e. typical scenario:

  1. Start resident compiler and compile
  2. Change (say) scala.collection.Seq and compile
  3. Continue editing and compiling other files

Normally, you get a StaleSymbol error in (3) since the originally loaded symbol for collection.Seq is no longer valid. The per run infrastructure in definitions makes sure that the new symbol is loaded transparently instead.

This is nice, but also quite complicated to implement. I noted that often new additions did not follow the patterns and therefore exposed the StaleSymbol vulnerability.

The big question is whether it is worth it. If this PR is merged, one would have to start a new compiler after step 2 above. Is this a problem that warrants the additional complexity? I don't know.

@odersky
Copy link
Contributor Author

odersky commented Jul 18, 2019

Based on #6871.

@odersky odersky force-pushed the change-no-per-run branch from eca99e5 to 3ecfae3 Compare July 18, 2019 11:31
@odersky
Copy link
Contributor Author

odersky commented Jul 18, 2019

Seems to much breaks in mysterious ways if we drop this.

@odersky odersky closed this Jul 18, 2019
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.

1 participant