Skip to content

Avoid cycles when unpickling the stdlib from TASTY #5901

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
Feb 12, 2019

Conversation

smarter
Copy link
Member

@smarter smarter commented Feb 11, 2019

adjustForTuple shouldn't be used when unpickling Java (because the
Tuple classes are always defined in .scala files) nor when unpickling
TASTY (because at that point, adjustForTuple has already been called
by Namer before pickling). This avoids some cycles when unpickling
the standard library from TASTY (we don't have a published
Dotty-compiled standard library yet, but trying to use incremental
compilation in the stdlib that is part of our community build is enough
to trigger the issue).

Note: This won't handle the hypothetical future case of Scala 2
generated TASTY files which wouldn't have the extra parents, but let's not
worry about that for now.

@odersky odersky assigned smarter and unassigned odersky Feb 12, 2019
`adjustForTuple` shouldn't be used when unpickling Java (because the
Tuple classes are always defined in .scala files) nor when unpickling
TASTY (because at that point, `adjustForTuple` has already been called
by Namer before pickling). This avoids some cycles when unpickling
the standard library from TASTY (we don't have a published
Dotty-compiled standard library yet, but trying to use incremental
compilation in the stdlib that is part of our community build is enough
to trigger the issue).

Note: This won't handle the hypothetical future case of Scala 2
generated TASTY files which wouldn't have the extra parents, but let's not
worry about that for now.
@smarter smarter merged commit 51853d6 into scala:master Feb 12, 2019
@allanrenucci allanrenucci deleted the stdlib-tasty branch February 12, 2019 15:16
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