Skip to content
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

Duplicate errors in editor produced on language server initialization #49437

Closed
DanielRosenwasser opened this issue Jun 8, 2022 · 2 comments · Fixed by #50309
Closed

Duplicate errors in editor produced on language server initialization #49437

DanielRosenwasser opened this issue Jun 8, 2022 · 2 comments · Fixed by #50309
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Fixed A PR has been merged for this issue Needs Investigation This issue needs a team member to investigate its status.

Comments

@DanielRosenwasser
Copy link
Member

Weird symptoms/tips I've already collected.


The following code:

let lololol = 123;

lololo

Seems to produce two duplicate errors:

Two errors with the text Cannot find name 'lololo'. Did you mean 'lololol'?

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Jun 10, 2022
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 4.8.1 milestone Jun 10, 2022
@DanielRosenwasser DanielRosenwasser added the Bug A bug in TypeScript label Jul 15, 2022
@DanielRosenwasser
Copy link
Member Author

I figured out the failing test case. It has to do with whether semantic classification is requested before diagnostics come back. Here's a failing test case.

/// <reference path="./fourslash.ts" />

////let lololol = 123;
////
////lololo/**/

verify.encodedSemanticClassificationsLength("2020", 3);
verify.numberOfErrorsInCurrentFile(1);

If you comment away the semantic classifications call

- verify.encodedSemanticClassificationsLength("2020", 3);
+ // verify.encodedSemanticClassificationsLength("2020", 3);

then the test passes.

@DanielRosenwasser
Copy link
Member Author

DanielRosenwasser commented Aug 16, 2022

Okay, here's what I think happened:

I do think that #50309 should fix this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue Fixed A PR has been merged for this issue Needs Investigation This issue needs a team member to investigate its status.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants