Skip to content

fix jsdoc errors in .ts in tsserver #54185

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

Merged
merged 5 commits into from
May 9, 2023

Conversation

sandersn
Copy link
Member

@sandersn sandersn commented May 8, 2023

when requesting diagnostics after a different services command.

There are two fixes, and though they probably don't address every possible error that could appear in JSDoc, they should at least improve the problem substantially. However, I don't actually know if the scenario makes sense. Is it required that diagnostics be requested before other services work reliably? If so, the fix is to figure out why the language service is getting ooorder calls instead. (And document the requirement in the API so others know it too.)

Fixes #50341
Fixes #49109

sandersn added 2 commits May 8, 2023 08:09
when requesting diagnostics *after* a different services command.

There are two fixes, and though they probably don't address every
possible error that could appear in JSDoc, they should at least improve
the problem substantially.

Fixes microsoft#50341

I need to check whether it helps microsoft#49109 as well.
@typescript-bot typescript-bot added For Backlog Bug PRs that fix a backlog bug labels May 8, 2023
import { baselineTsserverLogs, createLoggerWithInMemoryLogs, createSession } from "../helpers/tsserver";
import { createServerHost, File } from "../helpers/virtualFileSystemWithWatch";

describe("unittests:: services:: goToDefinition", () => {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fourslash no longer supports the methods needed to make the diagnostic call out-of-order, so I think this is better as a unit test, especially since the answer might turn out to be "don't make ooorder calls".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should try as much as possible to make sure that things work no matter the order; it may be the case that VS Code does it a certain way but I think it's super likely that some other client will do it that way. I know that in LSP, these orders are totally possible.

@sandersn sandersn merged commit 59d3a38 into microsoft:main May 9, 2023
@sandersn sandersn deleted the fix-jsdoc-errors-in-ts/tsserver branch May 9, 2023 17:00
@@ -0,0 +1,140 @@
import { protocol } from "../../_namespaces/ts.server";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you move this file to unittests/tsserver instead.. All the tests throgh tsserver are in there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied findAllReferences in this same directory. Should I move that one too?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes pls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Backlog Bug PRs that fix a backlog bug For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
5 participants