-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Simplify constraint depth limiter logic #41972
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.
We should still run this over dt and the like to see how well it works in the wild.
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the parallelized community code test suite on this PR at fa5181a. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at fa5181a. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at fa5181a. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the perf test suite on this PR at fa5181a. You can monitor the build here. Update: The results are in! |
The user suite test run you requested has finished and failed. I've opened a PR with the baseline diff from master. |
@ahejlsberg Here they are:Comparison Report - master..41972
System
Hosts
Scenarios
|
With this PR we always explore at least 10 levels of nested constraints. Thereafter, we continue to explore up to 50 levels of nested constraints provided there are no "deeply nested" types on the stack (i.e. no types for which five instantiations have been recorded on the stack). If we reach 50 levels of nesting, we are presumably exploring a repeating pattern with a long cycle that hasn't yet triggered the deeply nested limiter. We used to issue an error upon reaching 50 levels of nesting, but since the introduction of the depth limiter in #40971 we have no tests cases that get there, so I have removed that logic. Thus, infinite constraints are no longer considered an error, but circular constraints continue to be.
Fixes #41931.