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

Failed to start the language server. Error: command 'clangd.applyFix' already exists #126

Closed
3 tasks done
kittaakos opened this issue Jul 21, 2022 · 1 comment
Closed
3 tasks done
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

Describe the problem

Related to #125 (comment).

The second instance fails when I start multiple language servers in the workspace.

Failed to start the language server. Error: command 'clangd.applyFix' already exists
	at o.registerCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:85:61206)
	at Object.registerCommand (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:106:30919)
	at ExecuteCommandFeature.register (/Users/a.kitta/dev/git/vscode-arduino-tools/node_modules/vscode-languageclient/lib/common/executeCommand.js:50:1)
	at ExecuteCommandFeature.initialize (/Users/a.kitta/dev/git/vscode-arduino-tools/node_modules/vscode-languageclient/lib/common/executeCommand.js:30:1)
	at LanguageClientPerSketch.initializeFeatures (/Users/a.kitta/dev/git/vscode-arduino-tools/node_modules/vscode-languageclient/lib/common/client.js:1286:1)
	at LanguageClientPerSketch.doInitialize (/Users/a.kitta/dev/git/vscode-arduino-tools/node_modules/vscode-languageclient/lib/common/client.js:823:1)
	at processTicksAndRejections (/Users/a.kitta/dev/git/vscode-arduino-tools/lib/internal/process/task_queues.js:96:5)
	at async LanguageClientPerSketch.start (/Users/a.kitta/dev/git/vscode-arduino-tools/dist/bundle.js:13668:13) {stack: 'Error: command 'clangd.applyFix' already exis…vscode-arduino-tools/dist/bundle.js:13668:13)', message: 'command 'clangd.applyFix' already exists'}

To reproduce

See #125 for the steps.

Expected behavior

It's possible to start multiple language servers from the same workspace.

Arduino Language Server version

0.7.1

Arduino CLI version

0.25.0

Operating system

macOS

Operating system version

12.3.1

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@kittaakos kittaakos added topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project labels Jul 21, 2022
@kittaakos
Copy link
Contributor Author

I am going to close it as invalid.

The client must handle the command ID collision if they want to support a multi-LS setup.

For example, remap the command-id to $sketchUri:command-id with an LSP middleware.

@kittaakos kittaakos added conclusion: invalid Issue/PR not valid and removed type: imperfection Perceived defect in any part of project labels Jul 21, 2022
@per1234 per1234 added the type: imperfection Perceived defect in any part of project label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

2 participants