Skip to content

feat(vscode, language-server, typescript-plugin): communicate with tsserver based on request forwarding #5252

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 7 commits into from
Mar 6, 2025

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Mar 5, 2025

The named pipes server was introduced in 2.0 with #3908 to allow the LSP server to communicate with the typescript plugin. But since the release of 2.0 it has revealed a lot of problems.

We are switching to a more reliable method:

  1. Proxy fs.readFileSync in extension client to expose tsserver processes for typescript-language-featrues.
  2. The language server sends the request to the extension client, which then accesses the tsserver process and forwards it to the typescript plugin.
  3. After the typescript plugin responds, the extension client sends the results to the language server.

Since the typescript plugin no longer needs to maintain a named pipes server, and the language server no longer maintains a named pipes client, this reduces a lot of complexity and improves reliability.

This introduces a breakthrough change for other IDEs that will need to implement language-server to tsserver request forwarding to get full functionality, and we will investigate the changes other IDEs will need to make before releasing 3.0.

The #5070 implementation of the push-based component info update method has been reverted, and an alternative method will be implemented in the next PR in order not to introduce performance regressions.

Copy link

pkg-pr-new bot commented Mar 5, 2025

Open in Stackblitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5252

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5252

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5252

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5252

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5252

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5252

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5252

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5252

commit: 780d1c6

@johnsoncodehk johnsoncodehk marked this pull request as ready for review March 6, 2025 08:32
@johnsoncodehk johnsoncodehk changed the title refactor: replace named pipes with request forwarding feat(vscode, language-server, typescript-plugin): communicate with tsserver based on request forwarding Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant