Look for clang-format installed on system before defaulting to bundled version#4855
Look for clang-format installed on system before defaulting to bundled version#4855Colengms merged 2 commits intomastermicrosoft/vscode-cpptools:masterfrom coleng/use_clang_format_on_systemmicrosoft/vscode-cpptools:coleng/use_clang_format_on_systemCopy head branch name to clipboard
Conversation
There was a problem hiding this comment.
Does it fallback to the shipped clang-format if it's not found on the path? Also, I think we should have a way to specify to "use the clang-format shipped with the C/C++ extension", because a hardcoded path won't work because the version will change every new release. Maybe some {default} or {bundled} variable or the empty string ""? Also, maybe the description of the clang_format_path should be updated?
I'm not convinced that falling back to the bundled version if someone has incorrectly configured their path, would be the right thing to do, as it would silently fail to use the setting they provided. IMHO, it would be better to fail. Also, I'm not convinced a new setting to override the behavior makes sense. I think using the version installed on the system should be preferred, and our version only used as a fallback. If the clang-format-path setting is not set, the path to the executable will be queried with |
Just to make sure I understand your comment correctly; I had assumed you meant if not found on a user-specified path. My understanding is that |
If they don't have any clang_format_path set, shouldn't it fall back to the bundled one? I think that's what your code does currently. How does the user overwrite the defaults (PATH version) to get the bundled one if they want it? |
Yeah, I wasn't talking about an explicitly set clang_format_path, I was talking about the PATH found from "which". |
sean-mcmanus
left a comment
There was a problem hiding this comment.
Can you update the description?
|
If this is just TypeScript changes can it go into 0.26.3-insiders4? |
Yes. I'll update the changelog. |
Addresses #3569