-
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
[Regression] - Language Server fails to call into plugin from v5.0-20221108 onwards #51713
Comments
The root cause seems to be https://github.com/microsoft/typescript-template-language-service-decorator/blob/a2e4d6b4cf04bedd7498b449c65f48dceb662d9b/src/template-language-service-decorator.ts#L199 here. This fails after we converted our code to modules @mjbvz fyi seems like you maintain that repo |
I'm out of the country and can't look at this until next week, but in general I don't see a way to fix this other than to get everyone off of assigning to the TS library; this isn't even an esbuild thing, it's just how modules work (rollup would produce the same errors). We "fixed" this for sys by adding setSys. But that shouldn't really be even in our API. We could do something like that for this function, but I am really wondering if we can fix the API such that this kind of thing is not needed. |
I am back and looking at this; just to be clear, is the offending code solely in the VS Code extension, and not replicated in any other place? Or is this a problem with any and all plugins? If it's just VS Code, then we can just use #51769 and be fine; we can get VS Code updated long before 5.0 makes it out. |
any plugin would have a problem who is trying to do this but i think #51769 should be good enough for this. |
Hey @sheetalkamat & @jakebailey we're still having issues with this, now that the VSCode March 2023 release went out (with TypeScript 5.0.0 set by default) we now have many users noticing auto completion has broken. This seems to be due to the language service decorator failing. It seems some fixes were made by @mjbvz but not released. I've pulled the latest commit from https://github.com/microsoft/typescript-template-language-service-decorator and tested it and I can see auto complete works. (i needed to bump typescript to 5.0.3). Any help you can offer would be appreciated! |
I don't know what work there is to do on our end; I'm surprised we didn't close this issue after #51769 was merged. Given the upstream problem has been fixed, it seems like this is just a matter of whatever plugins which depend on Are you saying @mjbvz just needs to bump something? |
it was fixed on the repo but no release was made, meaning plugins have nothing to update to. Also the dev-version of typescript that repo was using is now out of date. You’re correct that it’s not directly a “TypeScript team” problem, but it is a project that falls under the Microsoft organisation for language servers. |
@jasonwilliams Try picking up typescript-template-language-service-decorator 2.3.2 which should have the fix |
Hey @mjbvz thanks that works, although most of the e2e tests you wrote no longer work. The TS Server sends an empty response: styled-components/typescript-styled-plugin#9 (comment) |
This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
Bug Report
🔎 Search Terms
"language server", "language service plugin"
🕗 Version & Regression Information
This originated from: microsoft/vscode-typescript-next#61 please see here for more context.
It has been reported that the VSCode Styled Components extension stops working when also being used with TypeScript Nightly.
Our typescript plugin does use the latest version of typescript (4.9.3) and I have tested it with "next" (5.x) and it still happens so I think this bug is on the TypeScript Language Server side.
Version 20221103 successfully calls into the language server and receives completions
Version 20221108 fails to call into the language server, so we don't get anything at all.
Reproducing
The text was updated successfully, but these errors were encountered: