-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Ignore related info in diagnostic deduplication #50309
Conversation
@typescript-bot pack this |
Heya @andrewbranch, I've started to run the tarball bundle task on this PR at 95736c0. You can monitor the build here. |
Hey @andrewbranch, 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 |
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.
My understanding here is that lookup we were skipping related information for binary search (checker uses this to get diagnostic and attach related information to existing or new diagnostic) But while inserting we used diagnostic with related information to determine sorting order and that messed with lookup i think which resulted in duplicate errors in your scenario..
This change makes sense.
I wonder if this solves #49437 as well. |
@andrewbranch @sheetalkamat I figured out how that weird issue I filed manifested itself and described it on #49437 (comment) @andrewbranch can you add something like the following test case to see if it passes now? Today it fails in TypeScript. /// <reference path="./fourslash.ts" />
////let lololol = 123;
////
////lololo/**/
verify.encodedSemanticClassificationsLength("2020", 3);
verify.numberOfErrorsInCurrentFile(1); |
@DanielRosenwasser it passes. |
CI failure was in main and fixed in #50320 |
Probably fixes #50243 but I can’t reproduce it. I noticed this first in #50088 (review) and worked around it. I think there may be more than one place we deduplicate diagnostics which makes this not noticeable on the CLI or in error baselines—the two baselines that changed actually had materially different related info, but I still think it’s better to deduplicate. In the fourslash test that changed, however, the language service actually had two identical copies
of each diagnostic.
Also fixes #49437