-
Notifications
You must be signed in to change notification settings - Fork 118
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
No longer possible to use cmd as clangd executable #683
Comments
…s upgrade, it was possible to execute cmd/bat scripts as executable. After this update this was suddenly broken. Our use-case for using such a script has to do with the consistency of our clang-tooling. We build clang-format, clang-tidy, clangd ... all together and put this in a package manager. In the script, we first download these executables (when needed) and than start the downloaded clangd. As such, when fixing an issue in clang-tidy, the same issue will get fixed in the clangd exe. Without this script, it is impossible to automatically trigger this download and it introduces the risk that we do not update all the tooling to the latest version.
Released in 0.1.30. |
Thanks @HighCommander4, I will be able to look at this on Friday. Thanks for reverting and as such reducing the pressure |
…t was possible to execute cmd/bat scripts as executable. After this update this was suddenly broken. Our use-case for using such a script has to do with the consistency of our clang-tooling. We build clang-format, clang-tidy, clangd ... all together and put this in a package manager. In the script, we first download these executables (when needed) and than start the downloaded clangd. As such, when fixing an issue in clang-tidy, the same issue will get fixed in the clangd exe. Without this script, it is impossible to automatically trigger this download and it introduces the risk that we do not update all the tooling to the latest version. Fixes clangd#683 In this reapply, we quote both the command line and the arguments, such that both can contain spaces. We also introduce the option useScriptAsExecutable, such that this is only enabled when the user wants it.
…t was possible to execute cmd/bat scripts as executable. After this update this was suddenly broken. Our use-case for using such a script has to do with the consistency of our clang-tooling. We build clang-format, clang-tidy, clangd ... all together and put this in a package manager. In the script, we first download these executables (when needed) and than start the downloaded clangd. As such, when fixing an issue in clang-tidy, the same issue will get fixed in the clangd exe. Without this script, it is impossible to automatically trigger this download and it introduces the risk that we do not update all the tooling to the latest version. Fixes clangd#683 In this reapply, we quote both the command line and the arguments, such that both can contain spaces. We also introduce the option useScriptAsExecutable, such that this is only enabled when the user wants it.
Reverted again in #736 for causing #734. Discussion in #734 suggests that the issue is related to the default value of Regardless of the specific fix, I'd also like to make a process change before re-landing a fix here again: I'd like to add a way to create an "unstable" / "nightly" release that shows up in https://github.com/clangd/vscode-clangd/releases/ and allows users to download and test a |
I put up a PR adding such a CI action at #748. |
…t was possible to execute cmd/bat scripts as executable. After this update this was suddenly broken. Our use-case for using such a script has to do with the consistency of our clang-tooling. We build clang-format, clang-tidy, clangd ... all together and put this in a package manager. In the script, we first download these executables (when needed) and than start the downloaded clangd. As such, when fixing an issue in clang-tidy, the same issue will get fixed in the clangd exe. Without this script, it is impossible to automatically trigger this download and it introduces the risk that we do not update all the tooling to the latest version. Fixes clangd#683 In this reapply, we quote both the command line and the arguments, such that both can contain spaces. We also introduce the option useScriptAsExecutable, such that this is only enabled when the user wants it. We also provide the default value as boolean instead of string
…t was possible to execute cmd/bat scripts as executable. After this update this was suddenly broken. Our use-case for using such a script has to do with the consistency of our clang-tooling. We build clang-format, clang-tidy, clangd ... all together and put this in a package manager. In the script, we first download these executables (when needed) and than start the downloaded clangd. As such, when fixing an issue in clang-tidy, the same issue will get fixed in the clangd exe. Without this script, it is impossible to automatically trigger this download and it introduces the risk that we do not update all the tooling to the latest version. Fixes clangd#683 In this reapply, we quote both the command line and the arguments, such that both can contain spaces. We also introduce the option useScriptAsExecutable, such that this is only enabled when the user wants it. We also provide the default value as boolean instead of string
In VSCode 1.92 and later (which uses node 20), this requires passing `shell: true` in the executable options. However, using `shell: true` changes the behavior in some other ways, e.g. the path and arguments now have to be quoted in case they contain spaces. To avoid the potential for regressions from using `shell: true`, its use is made conditional on a new clangd option, "clangd.useScriptAsExecutable". Fixes #683
The VS Code upgrade to 1.92 contains a new node version (20)
This version seems to have as a side effect that scripts can no longer be used as 'executable' on windows
(see similar issue for cmake: microsoft/vscode-cmake-tools#4037 (comment))
When using VS Code with 1.91, I can use a clangd.cmd that figures out the clangd version to use (the same as we use to compile). However from VS Code 1.92 this is no longer possible.
I'm no expert in typescript, though I believe this behavior can be re-enabled in ClangdContext::active by passing "shell: true" as part of the options of vscodelc.Executable.
Logs
System information
Operating system: Windows
The text was updated successfully, but these errors were encountered: