-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New semantic analyzer: support recursive TypedDicts and NamedTuples #6445
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
Comments
There are some tests skipped with |
Recursive type aliases are similar. |
I will take care of this issue. |
I have a work-in-progress branch that turns these into blocking errors. |
There is a feature regression: we no longer expand recursive definition once. I think that this is acceptable for now. We can either try to replicate the expansion of recursive definitions later on, or we can wait until we have full recursive support before we do anything about this. Only enabled tests that do something reasonable. Recursive type aliases and other things still don't work. Work towards #6445.
…pes (#7080) There is a feature regression: we no longer expand recursive definition once. I think that this is acceptable for now. We can either try to replicate the expansion of recursive definitions later on, or we can wait until we have full recursive support before we do anything about this. Only enabled tests that do something reasonable. Recursive type aliases and other things still don't work. Work towards #6445.
This fixes maximum iteration count errors. Recursive type aliases still don't work and the behavior is a regression from the old semantic analyzer. Previously they were truncated, but now they aren't supported at all. We could perhaps hack something similar to what we used to have, but I don't think that it's urgent. This also breaks some use cases where "semi-recursive" type aliases were supported previously. The support mechanism caused infinite expansion for actual recursive type aliases. I couldn't come up with a simple way to support both, so I decided to prioritize fixing infinite expansion, as they have a worse impact on user experience. Work towards #6445.
This fixes maximum iteration count errors. Recursive type aliases still don't work and the behavior is a regression from the old semantic analyzer. Previously they were truncated, but now they aren't supported at all. We could perhaps hack something similar to what we used to have, but I don't think that it's urgent. This also breaks some use cases where "semi-recursive" type aliases were supported previously. The support mechanism caused infinite expansion for actual recursive type aliases. I couldn't come up with a simple way to support both, so I decided to prioritize fixing infinite expansion, as they have a worse impact on user experience. Work towards #6445.
I think that this is now mostly resolved. Added #7111 as a follow-up issue. |
There are 7 tests that refer to this issue as an excuse, should we enable them first?
|
Yeah, let's go through all of those issues firs. |
These recursive type definitions no longer cause crashes. Closes #6445.
Various recursive type definitions no longer cause crashes. Fix bogus messages about cyclic definitions when definition is acyclic when there are also recursive type definitions in the same target. Closes #6445.
These have (limited) support in old analyzer, with new semantic analyzer they just crash.
The text was updated successfully, but these errors were encountered: