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

Scala 2 pickle reader: first read all symbols, then all their types. #421

Merged
merged 1 commit into from
Dec 14, 2023

Conversation

sjrd
Copy link
Contributor

@sjrd sjrd commented Dec 13, 2023

This mimics how we ready .tasty files. First, we create all the symbols defined in the pickle, without reading their types. Only then do we read all the types of all the symbols.

This avoids tricky recursive situations, notably in the presence of complicated existentials and refinement classes mixed together.

Some of the hacks we had to do for refinement classes disappear as a result, because they are not needed anymore.

We can also treat MODULEsym's like other term symbols, without separate code paths.

@sjrd sjrd requested a review from adpi2 December 13, 2023 16:41
@sjrd sjrd force-pushed the fix-init-errors-for-scala2-existentials branch from 8a6b6c6 to 9431816 Compare December 13, 2023 16:46
This mimics how we ready .tasty files. First, we create all the
symbols defined in the pickle, without reading their types. Only
then do we read all the types of all the symbols.

This avoids tricky recursive situations, notably in the presence
of complicated existentials and refinement classes mixed together.

Some of the hacks we had to do for refinement classes disappear
as a result, because they are not needed anymore.

We can also treat `MODULEsym`'s like other term symbols, without
separate code paths.
@sjrd sjrd force-pushed the fix-init-errors-for-scala2-existentials branch from 9431816 to d870054 Compare December 13, 2023 16:52
@sjrd sjrd merged commit f450e46 into scalacenter:main Dec 14, 2023
4 checks passed
@sjrd sjrd deleted the fix-init-errors-for-scala2-existentials branch December 14, 2023 09:32
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