Closed 0v3rt1r3d closed 1 week ago
I see same issue with "clangd.path": "/usr/bin/clangd" and /usr/bin/clangd --version
:
clangd version 17.0.6 (Red Hat 17.0.6-1.module+el8.10.0+20808+e12784c0)
Features: linux
Platform: x86_64-unknown-linux-gnu; target=x86_64-redhat-linux-gnu
On RedHat 8 on Intel CPU as well as
clangd version 18.1.8 (Red Hat 18.1.8-1.module+el8.10.0+22061+3612b2ba)
Features: linux
Platform: aarch64-unknown-linux-gnu; target=aarch64-redhat-linux-gnu
on ARM CPU. Same when only using "clangd.path" : "clangd". Working again after downgrading vscode-clangd to v0.1.29
I am experiencing the same issue after the vscode-clangd extension was automatically updated to version 0.1.30. After upgrading, I started seeing the following error when opening my C++ projects.
Reverting back to version 0.1.29 and restarting VSCode resolves the issue. It seems that downgrading is the only workaround currently available.
System details:
cc @JVApen @quanzhuo
Regression from #708 or #715 I presume?
I got the same error Error: spawn clangd" ENOENT
, It worked fine after rolling back to vscode-clangd v0.1.29.
It seems to be unrelated to the Clangd version, I tried Clangd v13, v16, v17, v18.
Regression from #708 or #715 I presume?
I posted a patch to revert these changes at https://github.com/clangd/vscode-clangd/pull/724 until we can sort this out.
The changes suspected of causing this regression have been backed out in 0.1.31. Please give that version a try and let me know if the issue is fixed there.
Same issue with version 0.1.29 here.
Sorry for the mix-up. This issue’s in version 0.1.30.
The flag `-clang-tidy-checks` is obsolete and ignored.
clangd: Unknown command line argument 'bugprone-*,'. Try: '/usr/bin/clangd --help'
clangd: Unknown command line argument 'misc-*,'. Try: '/usr/bin/clangd --help'
clangd: Unknown command line argument 'google-*,'. Try: '/usr/bin/clangd --help'
clangd: Unknown command line argument 'modernize-*,'. Try: '/usr/bin/clangd --help'
clangd: Unknown command line argument 'readability-*,'. Try: '/usr/bin/clangd --help'
clangd: Unknown command line argument 'portability-*'. Try: '/usr/bin/clangd --help'
[Info - 4:08:33 PM] Connection to server got closed. Server will restart.
[Error - 4:08:33 PM] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 4:08:33 PM] Clang Language Server client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
.vscode/settings.json
:"clangd.arguments": [
"--all-scopes-completion",
"--background-index",
"--clang-tidy",
"--clang-tidy-checks=performance-*, bugprone-*, misc-*, google-*, modernize-*, readability-*, portability-*",
"--compile-commands-dir=${workspaceFolder}/.vscode",
"--completion-parse=auto",
"--completion-style=detailed",
"--enable-config",
"--fallback-style=Microsoft",
"--function-arg-placeholders=true",
"--header-insertion-decorators",
"--header-insertion=never",
"--log=verbose",
"--pch-storage=memory",
"--pretty",
"--ranking-model=decision_forest",
"-j=8"
],
Removing the --clang-tidy-checks
makes everything work as expected.
@Carryme1899 could you file a new ticket for that please?
The changes suspected of causing this regression have been backed out in 0.1.31. Please give that version a try and let me know if the issue is fixed there.
After I updated the version to 0.1.31, this issue disappeared.
@0v3rt1r3d, @bburgerm, @lingkerio can you share the complete set of settings that are used for clangd? Especially "clangd.arguments"?
@JVApen my full configuration is
"clangd.onConfigChanged": "restart",
"clangd.arguments": [
"--header-insertion=never",
"--pretty",
"--malloc-trim"
],
"clangd.fallbackFlags": [
"-std=c++20"
],
"clangd.path": "/usr/bin/clangd"
but I had removed everything with 0.1.30 and had the same issues.
Not with 0.1.31 (or with 0.1.29) all working OK again.
@JVApen
"clangd.arguments": [
"--all-scopes-completion",
"--background-index",
"--clang-tidy",
"--clang-tidy-checks=performance-*, bugprone-*, misc-*, google-*, modernize-*, readability-*, portability-*",
"--compile-commands-dir=${workspaceFolder}/.vscode",
"--completion-parse=auto",
"--completion-style=detailed",
"--enable-config",
"--fallback-style=Webkit",
"--function-arg-placeholders=true",
"--header-insertion-decorators",
"--header-insertion=iwyu",
"--include-cleaner-stdlib",
"--log=verbose",
"--pch-storage=memory",
"--pretty",
"--ranking-model=decision_forest",
"-j=12"
],
"clangd.fallbackFlags": [
"-pedantic",
"-Wall",
"-Wextra",
"-Wcast-align",
"-Wdouble-promotion",
"-Wformat=2",
"-Wimplicit-fallthrough",
"-Wmisleading-indentation",
"-Wnon-virtual-dtor",
"-Wnull-dereference",
"-Wold-style-cast",
"-Woverloaded-virtual",
"-Wpedantic",
"-Wshadow",
"-Wunused",
"-pthread",
"-fuse-ld=lld",
"-fsanitize=address",
"-fsanitize=undefined"
],
"clangd.checkUpdates": false,
"clangd.onConfigChanged": "restart",
"clangd.serverCompletionRanking": true,
"clangd.detectExtensionConflicts": true,
Today my vscode-clangd plugin had been automatically updated from 0.1.29 to 0.1.30
hi! thanks for such thorough report. i am wondering if in automatically updated, then how did you find the older version you had on your system? are there some logs etc stored by vscode? thanks.
Configuration of @lingkerio can be explained with the spaces in the clang-tidy checks, similar to #725 However, the configuration of @bburgerm does not seem to have any spaces or double quotes in them. Neither in the arguments or the program.
I'm wondering what could cause the issue. Can it be these programs are symlinks? I'll test that later today
Today my vscode-clangd plugin had been automatically updated from 0.1.29 to 0.1.30 and I began receiving the following error message for the c++ projects I'm working with (middle-sized c++ project, single directory in the workspace if that matters).
"Clang Language Server client: couldn't create connection to server."
As I can see nothing else changed in my system. Also switching back to 0.1.29 with complete restart of vscode helps (just reloading extensions doesn't).
Logs
System information Clangd version (from the log, or
clangd --version
):clangd extension version: 0.1.30 Operating system: Mac OS Sequoia 15.0