clangd / vscode-clangd

Visual Studio Code extension for clangd
https://marketplace.visualstudio.com/items?itemName=llvm-vs-code-extensions.vscode-clangd
MIT License
641 stars 113 forks source link

Restore VsCode 1.91 behavior of allowing scripts as executable #730

Closed JVApen closed 3 days ago

JVApen commented 4 days ago

In VsCode 1.72 Node was updated to version 20, before this 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.

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.

JVApen commented 4 days ago

@HighCommander4 The issue with the space was clear and should be resolved. However, I had the impression that there were other reasons why it failed which we don't know about. As such, I've introduced an option, such that this minimizes the risk of breaking peoples experience once again.