-
-
Notifications
You must be signed in to change notification settings - Fork 665
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
Make ctx.pass immutable #11538
Make ctx.pass immutable #11538
Conversation
This indeed fails exactly like I expected it to: a build macro causing the typing of a module, and then trying to access a class field doesn't work because we never flush |
# Conflicts: # src/typing/macroContext.ml
Wartales breaks badly with this change :/ (will send errors via slack tomorrow morning) Other projects seem mostly ok (so it may be about hxbit closures?), ie. as ok as they are with current nightlies (so need to revert |
For documentation purposes: the problem was that |
This was easier than expected. We now also clone the context before typing expressions, which means that we don't have to mutate
ctx.pass <- PTypeField
anymore. This in turn means that all context instances now have a fixed pass, which should make everything much easier to debug. We could even give them names and go to their piano rehearsals.I'd like to see if I can break the macro change here because I feel like this should be breakable, given that we no longer enter
PTypeField
pass. I think this portion of code should also clone a new expression context, but before I do that I'll see how to actually trigger an issue here.