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

experiment: do not bring forward symbols created in transform and backend phases #21865

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Oct 31, 2024

I'm making some significant assumptions here, but nevertheless, let's see if it works. The idea here is that since those symbols are not included in tasty, they might as well not exist in subsequent runs which compile different files (without the trees that would spawn them later on). I'm never quite sure how runs interact in repl, so I suspect something might break there. Alternative solution is to tag the specific problematic new Symbols with something to not bring them forward (but that's costly).

fixes #21844, where in the first run lazy val in SuperClass in expanded with additional symbols in LazyVals, and in later runs that tree ends up untouched, those symbols not produced anywhere, but SuperClass members are still accessed via SubClass.allMembers (where the problematic $lzyInit symbols would not be visible when compiling separately).

@jchyb jchyb changed the title experiment: do not bring forward symbols defined in transform and backend phases experiment: do not bring forward symbols created in transform and backend phases Oct 31, 2024
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.

Stale symbol when calling a macro in companion object when superclass has a lazy val
1 participant