-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix callTrace
of inlined methods
#18738
Merged
odersky
merged 2 commits into
scala:main
from
dotty-staging:fix-source-file-of-inlined-assert-with-scala2-library-tasty
Nov 6, 2023
Merged
Fix callTrace
of inlined methods
#18738
odersky
merged 2 commits into
scala:main
from
dotty-staging:fix-source-file-of-inlined-assert-with-scala2-library-tasty
Nov 6, 2023
Conversation
This file contains 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
nicolasstucki
changed the title
Fix callTrace if inlined methods
Fix Oct 20, 2023
callTrace
of inlined methods
nicolasstucki
force-pushed
the
fix-source-file-of-inlined-assert-with-scala2-library-tasty
branch
7 times, most recently
from
October 24, 2023 07:43
26669c9
to
2134515
Compare
nicolasstucki
added
the
needs-minor-release
This PR cannot be merged until the next minor release
label
Oct 24, 2023
nicolasstucki
force-pushed
the
fix-source-file-of-inlined-assert-with-scala2-library-tasty
branch
2 times, most recently
from
October 24, 2023 12:20
5ad2eaf
to
a46bed4
Compare
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this pull request
Oct 31, 2023
This test exists for historical reasons. Now we compile the Scala 2 library in the `scala2-library-bootstrapped` project. This one checks that it compiles (with `-Ycheck:all`) and is used to package the TASTy files in the `scala2-library-tasty` project. Furthermore, now there is a `scala/scala` test that checks that the library can be compiled with Scala 3. This test is fundamentally broken but we have not noticed it because we do not use `-Ycheck:all`. The reason is that when we compile `scala.Predef` we get a conflict with `scala.runtime.stdLibPatches.Predef` when we patch the symbols. This also surfaced in scala#18738.
nicolasstucki
added a commit
that referenced
this pull request
Nov 1, 2023
This test exists for historical reasons. Now we compile the Scala 2 library in the `scala2-library-bootstrapped` project. This one checks that it compiles (with `-Ycheck:all`) and is used to package the TASTy files in the `scala2-library-tasty` project. Furthermore, now there is a `scala/scala` test that checks that the library can be compiled with Scala 3. This test is fundamentally broken but we have not noticed it because we do not use `-Ycheck:all`. The reason is that when we compile `scala.Predef` we get a conflict with `scala.runtime.stdLibPatches.Predef` when we patch the symbols. This also surfaced in #18738.
We need to keep the reference to the called method, not only the symbol of the to level class. This is important for the traces of the `assert` method that is defined in a different file. This might also be useful for macro annotations. This is also a solution to the awkward Select vs. Ident distinction to identify macros in `YCheckPositions`.
nicolasstucki
force-pushed
the
fix-source-file-of-inlined-assert-with-scala2-library-tasty
branch
from
November 1, 2023 08:58
a46bed4
to
eb0c408
Compare
odersky
approved these changes
Nov 6, 2023
odersky
deleted the
fix-source-file-of-inlined-assert-with-scala2-library-tasty
branch
November 6, 2023 20:48
prolativ
pushed a commit
that referenced
this pull request
Nov 21, 2024
This test exists for historical reasons. Now we compile the Scala 2 library in the `scala2-library-bootstrapped` project. This one checks that it compiles (with `-Ycheck:all`) and is used to package the TASTy files in the `scala2-library-tasty` project. Furthermore, now there is a `scala/scala` test that checks that the library can be compiled with Scala 3. This test is fundamentally broken but we have not noticed it because we do not use `-Ycheck:all`. The reason is that when we compile `scala.Predef` we get a conflict with `scala.runtime.stdLibPatches.Predef` when we patch the symbols. This also surfaced in #18738. [Cherry-picked 8c6f4c7]
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.
We need to keep the reference to the called method, not only the symbol
of the to level class. This is important for the traces of the
assert
method that is defined in a different file. This might also be useful
for macro annotations.
This is also a solution to the awkward Select vs. Ident distinction to
identify macros in
YCheckPositions
.