-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Delay package object decls entering to the package object phase #9661
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
Merged
dwijnand
merged 6 commits into
scala:2.13.x
from
dwijnand:package-object-with-source-parent-cleaned-up
Jul 9, 2021
Merged
Delay package object decls entering to the package object phase #9661
dwijnand
merged 6 commits into
scala:2.13.x
from
dwijnand:package-object-with-source-parent-cleaned-up
Jul 9, 2021
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Another sketch, as discussed: #9664 |
a60c638
to
17b085a
Compare
17b085a
to
a5d03cd
Compare
retronym
reviewed
Jun 11, 2021
dwijnand
commented
Jun 30, 2021
retronym
approved these changes
Jul 8, 2021
8a15b1c
to
45e4837
Compare
45e4837
to
8a15b1c
Compare
Possibly this broke |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Existing code in the compiler avoids loading package.class when a source file contains a new definition for the package object. The source definition would be used instead in the
packageObjects
phase.This PR takes it a step further and defers forcing the info of all package.class until the
packageObjects
phase. This avoids spurioussymbol not found
errors when in a particular incremental compilation scenarion, when: a) super-class of the package object (defined within the same package) is provided as a source file and B) the package object is not supplied as a source file.This change is intended to obviate the workaround in Zinc that supplies
package.scala
to the compiler more often than should be strictly necessary.As a bonus, this addresses an issue with compiler determinism:
Fixes scala/bug#12092
Relates to #3389
Fixes scala/bug#5954 (properly this time, workaround removed and tests still pass)
Fixes scala/bug#4695