Skip to content

Revert "Fix callTrace if inlined methods" #19273

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
merged 1 commit into from
Dec 19, 2023

Conversation

nicolasstucki
Copy link
Contributor

This reverts commit ec75826.

The previous encoding of INLINE nodes in TASTy assumed that the callTrace was a type. We cannot make it a term, or we would not be able to unpickle this tree properly. We need another solution to be able to pickle this correctly. For now we revert the change to avoid generating invalid TASTy.

@nicolasstucki nicolasstucki added this to the 3.4.0 milestone Dec 14, 2023
@nicolasstucki nicolasstucki force-pushed the fix-inlined-tasty branch 3 times, most recently from ae6402b to 166882c Compare December 18, 2023 09:47
if (!isMacro(call)) // FIXME macro implementations can drop Inlined nodes. We should reinsert them after macro expansion based on the positions of the trees
sources = call.symbol.topLevelClass.source :: sources
if !isMacro(call) // FIXME macro implementations can drop Inlined nodes. We should reinsert them after macro expansion based on the positions of the trees
&& !isBootstrappedPredefWithPatchedMethods(call) // FIXME The patched symbol has a different source as the definition of Predef. Solution: define them directly in `Predef`s TASTy and do not patch (see #19231).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to add this new guard because now we execute tests for the Scala 2 library TASTy in the CI.

This reverts commit ec75826.

The previous encoding of INLINE nodes in TASTy assumed that the callTrace
was a type. We cannot make it a term, or we would not be able to unpickle
this tree properly. We need another solution to be able to pickle this
correctly. For now we revert the change to avoid generating invalid TASTy.
@nicolasstucki nicolasstucki merged commit eb4962b into scala:main Dec 19, 2023
@nicolasstucki nicolasstucki deleted the fix-inlined-tasty branch December 19, 2023 10:08
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