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
{{ message }}
Repository navigation
clang-format/tidy version comparisons fail for some builds #12806
When the user has installed their own version of clang-format or clang-tidy, but has not specified a specific path to the binary, we will compare one from the user's environment with the one we bundle in the extension to see which version is newer.
The logic currently expects the third token in the version query output to be the version number, but this is not always the case. I think a more robust solution might attempt to convert each token to a semver until we find a valid one in case there are more or less tokens in the output.
Thanks for working on this bug! Perhaps simply doing a match for /\d+\.\d+\.\d+/ or a similar regex in the output of clang-tidy --version would be easier?
It seems the code was being very strict in the token parsing and doesn't like that LLVM is in your string instead of the name of the binary clang-format or clang-tidy. I have a PR that loosens the restrictions and should deal with additional tokens.
Sean McManus (@sean-mcmanus) thanks! I tried it and it does use clang-tidy from the environment instead of the bundled one without specifying the path explicitly. However, the related issue I mentioned, #12804, is not fixed. Even though the correct version is now used, the URL to the docs still has v18.1.6 hard-coded into it. You can see it here:
Activity
bshoshany commentedon Oct 5, 2024
Thanks for working on this bug! Perhaps simply doing a match for
/\d+\.\d+\.\d+/or a similar regex in the output ofclang-tidy --versionwould be easier?Also, please consider my comment in #12718 and my related issue #12804.
bobbrow commentedon Oct 7, 2024
It seems the code was being very strict in the token parsing and doesn't like that LLVM is in your string instead of the name of the binary
clang-formatorclang-tidy. I have a PR that loosens the restrictions and should deal with additional tokens.sean-mcmanus commentedon Oct 9, 2024
Barak Shoshany (@bshoshany) A fix is available in https://github.com/microsoft/vscode-cpptools/releases/tag/v.1.22.8 .
bshoshany commentedon Oct 9, 2024
Sean McManus (@sean-mcmanus) thanks! I tried it and it does use
clang-tidyfrom the environment instead of the bundled one without specifying the path explicitly. However, the related issue I mentioned, #12804, is not fixed. Even though the correct version is now used, the URL to the docs still has v18.1.6 hard-coded into it. You can see it here:vscode-cpptools/Extension/src/LanguageServer/codeAnalysis.ts
Line 381 in 292d84f
So maybe the version that is determined in
settings.tsshould be cached and then inserted into this URL?