Delay package object decls entering to the package object phase#9661
Merged
dwijnand merged 6 commits intoscala:2.13.xfrom Jul 9, 2021
Merged
Conversation
Member
|
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
Contributor
|
Possibly this broke |
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
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
packageObjectsphase.This PR takes it a step further and defers forcing the info of all package.class until the
packageObjectsphase. This avoids spurioussymbol not founderrors 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.scalato 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