Skip to content

Don't set the compilerPath if the default is empty.#1741

Merged
sean-mcmanus merged 5 commits into
masterfrom
seanmcm/omitBlankCompilerPath
Mar 28, 2018
Merged

Don't set the compilerPath if the default is empty.#1741
sean-mcmanus merged 5 commits into
masterfrom
seanmcm/omitBlankCompilerPath

Conversation

@sean-mcmanus

Copy link
Copy Markdown
Contributor

No description provided.

@sean-mcmanus sean-mcmanus requested a review from bobbrow March 27, 2018 03:45
@sean-mcmanus

Copy link
Copy Markdown
Contributor Author

I'm still testing this change along with the language server side changes...

// Update the compilerPath, cStandard, and cppStandard with the default if they're missing.
let config: Configuration = this.configurationJson.configurations[this.CurrentConfiguration];
if (config.compilerPath === undefined) {
if (config.compilerPath === undefined && this.defaultCompilerPath && !config.compileCommands) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would we turn this off if compileCommands is set? There are cases where we can't get the compiler info from compile_commands.json because the command begins with a custom script or something. I believe we would fall back to the guessed compiler in that case and should propagate the chosen compiler back to c_cpp_properties.json

@sean-mcmanus sean-mcmanus merged commit ff5d363 into master Mar 28, 2018
@bobbrow bobbrow deleted the seanmcm/omitBlankCompilerPath branch March 28, 2018 03:25
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants