-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix debug assert in getConstructorDefinedThisAssignmentTypes #52321
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
#51524 seems more correct to me. |
@typescript-bot pack this |
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at a50fd5f. You can monitor the build here. |
@typescript-bot user test tsserver |
Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at a50fd5f. You can monitor the build here. |
Heya @DanielRosenwasser, I've started to run the diff-based user code test suite (tsserver) on this PR at a50fd5f. You can monitor the build here. |
Co-authored-by: Oleksandr T <[email protected]>
Pulled the other test (with with attribution) |
@typescript-bot pack this |
Heya @DanielRosenwasser, I've started to run the diff-based user code test suite (tsserver) on this PR at b3c27eb. You can monitor the build here. Update: The results are in! |
Heya @DanielRosenwasser, I've started to run the diff-based top-repos suite (tsserver) on this PR at b3c27eb. You can monitor the build here. Update: The results are in! |
Heya @DanielRosenwasser, I've started to run the tarball bundle task on this PR at b3c27eb. You can monitor the build here. |
Hey @DanielRosenwasser, 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 |
@DanielRosenwasser Here are the results of running the user test suite comparing Everything looks good! |
I actually think this PR is not quite right either. Why are we even trying to go down this path? It really does feel like the right fix is to fix up the logic in You can check out #52323 to see my latest attempt. |
@DanielRosenwasser Here are the results of running the top-repos suite comparing Something interesting changed - please have a look. Detailspalantir/blueprint
|
Fixes #51521
It turns out the above has been lingering around for a while; this one shows up in the top100 tsserver traces somewhat often, i.e. #52317 (comment)
The requests all happen in babel's testing artifacts, which have the extension
js
but are in fact not JS. The one in the repro contains TypeScript code.It seems like the bug is clear; this loop iterates over declarations to build an array of types, except that sometimes it can
continue
and skip over a declaration it doesn't like. But then, we pass that (smaller) array of types along with the original declaration array. The two need to be the same size as they are effectively zipped, but the loop explicitly doesn't guarantee that the two are going to be the same length. So, we can just build the list of declarations we actually cared about and then provide that instead.But, I have absolutely no clue how to actually test this; it takes tsreplay 700 some requests to get the files into the right state for this to appear and I quite know how to reduce that when I can't reproduce it myself in the editor.