Skip to content

clang server and client initialization failed #3348

@jgueytat

Description

@jgueytat

Describe the bug

clangd server and client fails to start

I do not know if there is a specific version of clangd to use. I saw the versions 11 and 13. Is there a way to reload the extension with another clangd version ? The VSCode API of the extension clangd is too recent ?

I[10:34:21.041] clangd version 11.0.0 (https://github.com/llvm/llvm-project 176249bd6732a8044d457092ed932768724a6f06)
I[10:34:21.041] PID: 1789
I[10:34:21.041] Working directory: /workspace/helloworld_in_c
I[10:34:21.041] argv[0]: /home/gitpod/.theia/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/11.0.0/clangd_11.0.0/bin/clangd
I[10:34:21.041] Starting LSP over stdin/stdout
I[10:34:21.046] <-- initialize(0)
I[10:34:21.046] Client supports legacy semanticHighlights notification and standard semanticTokens request, choosing the latter (no notifications).
I[10:34:21.047] --> reply:initialize(0) 0 ms
[Error - 10:34:21 AM] Server initialization failed.
TypeError: vscode.languages.registerDocumentSemanticTokensProvider is not a function
    at SemanticTokensFeature.registerLanguageProvider (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/semanticTokens.js:163:47)
    at SemanticTokensFeature.register (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:725:33)
    at SemanticTokensFeature.initialize (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/semanticTokens.js:83:14)
    at ClangdLanguageClient.initializeFeatures (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:2588:21)
    at /tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:2258:18
    at runNextTicks (internal/process/task_queues.js:59:5)
    at processImmediate (internal/timers.js:412:9)
[Error - 10:34:21 AM] Starting client failed
TypeError: vscode.languages.registerDocumentSemanticTokensProvider is not a function
    at SemanticTokensFeature.registerLanguageProvider (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/semanticTokens.js:163:47)
    at SemanticTokensFeature.register (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:725:33)
    at SemanticTokensFeature.initialize (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/semanticTokens.js:83:14)
    at ClangdLanguageClient.initializeFeatures (/tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:2588:21)
    at /tmp/vscode-extensions/llvm-vs-code-extensions.vscode-clangd@0.1.9/extension/node_modules/vscode-languageclient/lib/common/client.js:2258:18
    at runNextTicks (internal/process/task_queues.js:59:5)
    at processImmediate (internal/timers.js:412:9)
I[10:34:21.061] <-- initialized
I[10:34:21.061] <-- textDocument/didOpen
I[10:34:21.061] <-- shutdown(1)
I[10:34:21.061] --> reply:shutdown(1) 0 ms
I[10:34:21.062] Loaded compilation database from /workspace/helloworld_in_c
I[10:34:21.062] --> window/workDoneProgress/create(0)
I[10:34:21.062] Enqueueing 1 commands for indexing
I[10:34:21.062] ASTWorker building file /workspace/helloworld_in_c/main.cpp version 1 with command 
[/workspace/helloworld_in_c/build]
/usr/bin/g++-9 --driver-mode=g++ -g -o CMakeFiles/HelloWorld.dir/main.cpp.o -c /workspace/helloworld_in_c/main.cpp -fsyntax-only -resource-dir=/home/gitpod/.theia/globalStorage/llvm-vs-code-extensions.vscode-clangd/install/11.0.0/clangd_11.0.0/lib/clang/11.0.0
E[10:34:21.062] Transport error: Input/output error
I[10:34:21.062] LSP finished, exiting with status 1
I[10:34:21.432] Indexed /workspace/helloworld_in_c/main.cpp (5116 symbols, 19668 refs, 172 files)

109951009-79528580-7cdd-11eb-8aa5-d38db6024977

Steps to reproduce

Expected behavior

Additional information

Gitpod live workspace : https://coral-cardinal-x8utiz6k.ws-eu03.gitpod.io/

Example repository

Repository behind : https://bitbucket.org/jgueytat/helloworld_in_c/src/master/

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions