Skip to content
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 #397: Use a fake owner for orphan symbols in Scala 2 pickles. #399

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

sjrd
Copy link
Contributor

@sjrd sjrd commented Nov 27, 2023

We had a long-standing issue with "orphan" TYPEsyms and VALsyms in Scala 2 pickles. We were replacing them by "no symbol" themselves, because we did not know what to do with them.

Issue #397 finally provided a good setup to diagnose it. It turns out that those orphan symbols can be found as term and type params of method types and poly types, in particular, Scala 2's encoding of type lambdas, which can be produced by kind-projector.

Since we now have a good reason to have those orphan symbols, we bite the bullet and allocate one global symbol to "host" all those symbols coming from Scala 2.


Locally tested with libraryDependencies += "org.scalaz" % "scalaz-core_2.13" % "7.3.5", on the testSources classpath.

…ickles.

We had a long-standing issue with "orphan" `TYPEsym`s and `VALsym`s
in Scala 2 pickles. We were replacing them by "no symbol"
themselves, because we did not know what to do with them.

Issue scalacenter#397 finally provided a good setup to diagnose it. It turns
out that those orphan symbols can be found as term and type params
of method types and poly types, in particular, Scala 2's encoding
of type lambdas, which can be produced by kind-projector.

Since we now have a good reason to have those orphan symbols, we
bite the bullet and allocate one global symbol to "host" all those
symbols coming from Scala 2.
@sjrd sjrd requested a review from adpi2 November 27, 2023 17:26
@sjrd sjrd merged commit d6adb02 into scalacenter:main Nov 27, 2023
4 checks passed
@sjrd sjrd deleted the fix-scalaz-unpickling branch November 27, 2023 22:10
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