-
Notifications
You must be signed in to change notification settings - Fork 1.6k
refactor the compilerPath verification to get consistent results in JSON and UI verification #13553
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
Conversation
…/microsoft/vscode-cpptools into bobbrow/compilerPathVerification
Ready for review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we want to prevent users from accidentally creating "compilerPath: ""
in c_cpp_properties.json? I'm seeing compilerPath default to ""
when users type it in the json editor. I thought we had create some workaround to make it default to something else like null. Or maybe I'm thinking about another property? I thought we had done something similar for browse.path to prevent users from accidentally creating an empty browse.path by default.
It the type were string or null, then we could default the schema to populate it with null to prevent "" from being used by default.
Oh, it looks like null is used at the defaults for the C_Cpp.default.* equivalent settings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the path does not exist, and there are no quotes around the compiler, we split the string by spaces, take the first token as the compiler and the remaining tokens as the args. I can see how this error message is confusing though. I think I can make it longer and say that it's one of two problems instead. |
Ok, you may be right about this for |
@sean-mcmanus I tested the compilerPath property in c_cpp_properties.json some more, and it looks like when you autocomplete |
…/microsoft/vscode-cpptools into bobbrow/compilerPathVerification
For 1.26