-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New semantic analyzer: Fix (de)serialization of broken named tuples #6421
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some requests for clarification, since this is some pretty tricky code.
@@ -1794,8 +1794,13 @@ def patch_dependency_parents(self) -> None: | |||
semantic analyzer will perform this patch for us when processing stale | |||
SCCs. | |||
""" | |||
Analyzer = Union[SemanticAnalyzerPass2, NewSemanticAnalyzer] # noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this change? Is is related to the rest of this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is needed because otherwise incremental tests crash with the new analyzer (I added couple incremental tests) with something like 'BuildManager' doesn't have attribute 'semantic_analyzer'
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates!
Fixes #6413
In my original PR I missed the fact that "broken" named tuples (those where variable name and named tuple name are different) are stored under both names (one to actually access it, and other for (de)serialization).
I also extend the semantic analyzer API, and clean-up/clarify the symbol adding logic a bit.