You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Installing this extension on a fresh VS code, I get a prompt asking me if I want to get clangd installed. After the installation is done it asks about reloading the whole window. Until version 0.1.32 I could simply ignore it and run manually clangd: Restart language server. This is much faster, especially when running in devcontainer. Starting with 0.1.32 this is no longer valid. Upon invocation of restart command I get an error telling me that clangd.install is already registered:
Command 'clangd: Restart language server' resulted in an error. command 'clangd.install' already exists
I guess to problem stems from the changes in the commit 4da3e1e. In new version, in function ClangdContext.create we call install.activate passing the subscriptions object which is then used to store the results of vscode.commands.registerCommand. However, when clangd is not found at this point we return. The next time we call restart we'll try to do the same. We call dispose but it doesn't know anything about the previous subscriptions.
Finally, my question is - do we really need to reload the whole window? Am I missing something by just restarting a server? If not, maybe we could think about changing this behaviour?
Logs
2024-12-03 20:16:47.461 [info] Extension host with pid 75562 started
2024-12-03 20:16:47.471 [info] Lock '/home/dev/.vscode-server/data/User/workspaceStorage/b6d13464d5fc5822dc898f6c3a88d69a/vscode.lock': Lock acquired.
2024-12-03 20:16:47.502 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-12-03 20:16:47.503 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2024-12-03 20:16:47.503 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2024-12-03 20:16:47.503 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2024-12-03 20:16:47.800 [info] ExtensionService#_doActivateExtension llvm-vs-code-extensions.vscode-clangd, startup: false, activationEvent: 'onLanguage:cpp'
2024-12-03 20:16:47.971 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2024-12-03 20:16:47.971 [info] ExtensionService#_doActivateExtension mhutchie.git-graph, startup: true, activationEvent: '*'
2024-12-03 20:16:47.994 [info] ExtensionService#_doActivateExtension ms-dotnettools.vscode-dotnet-runtime, startup: true, activationEvent: 'workspaceContains:CMakeLists.txt', root cause: josetr.cmake-language-support-vscode
2024-12-03 20:16:48.071 [info] ExtensionService#_doActivateExtension ms-vscode.cmake-tools, startup: true, activationEvent: 'workspaceContains:CMakeLists.txt'
2024-12-03 20:16:48.289 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2024-12-03 20:16:48.289 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2024-12-03 20:16:48.425 [info] ExtensionService#_doActivateExtension josetr.cmake-language-support-vscode, startup: true, activationEvent: 'workspaceContains:CMakeLists.txt'
2024-12-03 20:16:49.218 [info] Eager extensions activated
2024-12-03 20:16:49.218 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-12-03 20:16:49.218 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-12-03 20:16:49.219 [info] ExtensionService#_doActivateExtension vadimcn.vscode-lldb, startup: false, activationEvent: 'onStartupFinished'
2024-12-03 20:17:06.778 [error] Error: command 'clangd.install' already exists
at Y0.registerCommand (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:114:31527)
at Object.registerCommand (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:156:36491)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:43:12051
at Generator.next (<anonymous>)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1240
at new Promise (<anonymous>)
at De (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1060)
at activate (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:43:11982)
at ClangdContext.<anonymous> (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:46:9890)
at Generator.next (<anonymous>)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1240
at new Promise (<anonymous>)
at De (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1060)
at ClangdContext.create (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:46:9848)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:46:12378
at Generator.next (<anonymous>)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1240
at new Promise (<anonymous>)
at De (/home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:1:1060)
at /home/dev/.vscode-server/extensions/llvm-vs-code-extensions.vscode-clangd-0.1.32/out/bundle.js:46:12301
at Y0.h (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:114:32833)
at Y0.$executeContributedCommand (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:114:33683)
at py.S (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:155639)
at py.Q (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:155419)
at py.M (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:154508)
at py.L (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:153613)
at mh.value (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:152410)
at P.B (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
at P.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:964)
at Vn.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:9457)
at mh.value (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:174:13300)
at P.B (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
at P.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:964)
at Vn.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:9457)
at Fm.A (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:12573)
at mh.value (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:10993)
at P.B (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
at P.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:964)
at j5.acceptChunk (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:7940)
at mh.value (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:7226)
at P.B (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:746)
at P.fire (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:29:964)
at V2.z (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:21944)
at V2.acceptFrame (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:21750)
at W2.n (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:20278)
at file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:17510
at Socket.t (file:///vscode/vscode-server/bin/linux-x64/f1a4fb101478ce6ec82fe9627c43efbf9e98c813/out/vs/workbench/api/node/extensionHostProcess.js:31:15451)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:559:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
at Readable.push (node:internal/streams/readable:390:5)
at TCP.onStreamRead (node:internal/stream_base_commons:191:23) clangd.restart {"value":"llvm-vs-code-extensions.vscode-clangd","_lower":"llvm-vs-code-extensions.vscode-clangd"}
System information
Clangd version: clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0)
clangd extension version: 0.1.33
Operating system: Linux, Windows
The text was updated successfully, but these errors were encountered:
Thanks for the report and diagnosis! I put up a fix at #743.
Finally, my question is - do we really need to reload the whole window? Am I missing something by just restarting a server? If not, maybe we could think about changing this behaviour?
Could you file a separate issue for this please, so it's not forgotten?
Installing this extension on a fresh VS code, I get a prompt asking me if I want to get clangd installed. After the installation is done it asks about reloading the whole window. Until version 0.1.32 I could simply ignore it and run manually
clangd: Restart language server
. This is much faster, especially when running in devcontainer. Starting with 0.1.32 this is no longer valid. Upon invocation of restart command I get an error telling me thatclangd.install
is already registered:I guess to problem stems from the changes in the commit 4da3e1e. In new version, in function
ClangdContext.create
we callinstall.activate
passing thesubscriptions
object which is then used to store the results ofvscode.commands.registerCommand
. However, when clangd is not found at this point we return. The next time we call restart we'll try to do the same. We calldispose
but it doesn't know anything about the previoussubscriptions
.Finally, my question is - do we really need to reload the whole window? Am I missing something by just restarting a server? If not, maybe we could think about changing this behaviour?
Logs
System information
Clangd version: clangd version 18.1.3 (https://github.com/llvm/llvm-project c13b7485b87909fcf739f62cfa382b55407433c0)
clangd extension version: 0.1.33
Operating system: Linux, Windows
The text was updated successfully, but these errors were encountered: