-
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
Consistently return errorType
when detecting circularities
#56429
base: main
Are you sure you want to change the base?
Consistently return errorType
when detecting circularities
#56429
Conversation
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
@@ -2,24 +2,17 @@ witness.ts(4,21): error TS2372: Parameter 'pInit' cannot reference itself. | |||
witness.ts(8,14): error TS2729: Property 'x' is used before its initialization. | |||
witness.ts(20,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'a' must be of type 'any', but here has type 'never'. | |||
witness.ts(28,12): error TS2695: Left side of comma operator is unused and has no side effects. | |||
witness.ts(29,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'co1' must be of type 'any', but here has type 'number'. |
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.
it seems that this is even a small improvement since the intention of the caller was not to raise those errors when the type is the errorType
, see: https://github.dev/microsoft/TypeScript/blob/32b618c2d8f42948e7d6fa2e9b264079e30b5349/src/compiler/checker.ts#L42290-L42296
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.
Swinging back here, it seems sorta odd just from the PoV that a self referencing thing will just not have any errors. It seems like this test is mainly to "witness" the type of these expressions in errors, but maybe it's fine. Odd that the .types
file does not show a change?
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.
Will have to do some forensics but I'm not sure why we even want to ignore these anyway...
Honestly I like this better @typescript-bot test top200 @typescript-bot perf test this |
Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at df7435d. 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 df7435d. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the regular perf test suite on this PR at df7435d. You can monitor the build here. Update: The results are in! |
Heya @jakebailey, I've started to run the tarball bundle task on this PR at df7435d. You can monitor the build here. |
Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at df7435d. You can monitor the build here. Update: The results are in! |
Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your
and then running There is also a playground for this build and an npm module you can use via |
Than the targeted |
@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:
CompilerComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
tsserverComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
StartupComparison Report - baseline..pr
System info unknown
Hosts
Scenarios
Developer Information: |
Hey @jakebailey, the results of running the DT tests are ready. |
Both! |
@jakebailey Here are the results of running the top-repos suite comparing Everything looks good! |
a quick experiment based on discussion/observations we had here: https://github.com/microsoft/TypeScript/pull/56258/files#r1393385776