-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Add depth limiter to isConstTypeVariable
function
#54624
Conversation
@typescript-bot test this |
Heya @ahejlsberg, I've started to run the extended test suite on this PR at 5609292. You can monitor the build here. |
Heya @ahejlsberg, I've started to run the diff-based user code test suite on this PR at 5609292. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the abridged perf test suite on this PR at 5609292. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the diff-based top-repos suite on this PR at 5609292. You can monitor the build here. Update: The results are in! |
Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 5609292. You can monitor the build here. Update: The results are in! |
@ahejlsberg Here they are:Comparison Report - main..54624
System
Hosts
Scenarios
Developer Information: |
@ahejlsberg Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
@ahejlsberg Here are the results of running the top-repos suite comparing Everything looks good! |
Hey @ahejlsberg, the results of running the DT tests are ready. Branch only errors:Package: three
|
isConstTypeVariable
function
Latest commit removes the first fix and instead adds a depth limiter to |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@typescript-bot test this |
Heya @jakebailey, I've started to run the extended test suite on this PR at 3dda751. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 3dda751. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 3dda751. You can monitor the build here. Update: The results are in! Update: The results are in! Update: The results are in! |
Heya @jakebailey, I've started to run the abridged perf test suite on this PR at 3dda751. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 3dda751. You can monitor the build here. Update: The results are in! |
@typescript-bot test this |
Heya @jakebailey, I've started to run the extended test suite on this PR at 3dda751. You can monitor the build here. |
@jakebailey Here are the results of running the user test suite comparing There were infrastructure failures potentially unrelated to your change:
Otherwise... Something interesting changed - please have a look. Details
|
@jakebailey Here they are:Comparison Report - main..54624
System
Hosts
Scenarios
Developer Information: |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
Hey @jakebailey, it looks like the DT test run failed. Please check the log for more details. |
2 similar comments
Hey @jakebailey, it looks like the DT test run failed. Please check the log for more details. |
Hey @jakebailey, it looks like the DT test run failed. Please check the log for more details. |
@typescript-bot run dt But this time don't time out on npm |
Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 3dda751. You can monitor the build here. Update: The results are in! |
Hey @jakebailey, the results of running the DT tests are ready. |
Ok, I think we finally have a clean test and perf run. This one is ready to merge. |
type.flags & TypeFlags.Union && some((type as UnionType).types, t => isConstTypeVariable(t, depth)) || | ||
type.flags & TypeFlags.IndexedAccess && isConstTypeVariable((type as IndexedAccessType).objectType, depth + 1) || | ||
type.flags & TypeFlags.Conditional && isConstTypeVariable(getConstraintOfConditionalType(type as ConditionalType), depth + 1) || | ||
type.flags & TypeFlags.Substitution && isConstTypeVariable((type as SubstitutionType).baseType, depth) || |
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.
why don't substitution types increase the depth? I guess that indexed access and conditional types are the only paths that might create new types and then loop back into isConstTypeVariable?
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.
Exactly!
Fixes #54610.