Skip to content
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

Tolerate errors in config file #10418

Merged
merged 3 commits into from
Aug 22, 2016
Merged

Conversation

zhengbli
Copy link
Contributor

@zhengbli zhengbli commented Aug 18, 2016

Fixes #9577

Now uses the TypeScript parser to parse tsconfig.json to be more tolerating

const error = createCompilerDiagnostic(Diagnostics.The_config_file_0_found_doesn_t_contain_any_source_files, configFilename);
return { succeeded: false, errors: [error] };
return { succeeded: false, errors: concatenate(parsedCommandLine.errors, [error]) };
Copy link
Contributor

Choose a reason for hiding this comment

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

do you still need the succeeded property? it seems that now we are handling the two branches identically.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are still different though. succeeded is true means we can proceed with building projects even if some minor errors exist, but succeeded is false means the errors are too serious that we are not going to build anything. Either invalid json and empty project will result in the later case.

Copy link
Contributor

Choose a reason for hiding this comment

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

even if it is invalid, why should not we build one? we found tsconfig.json, and we know the open file. so we can create a project with just that..

@mhegazy
Copy link
Contributor

mhegazy commented Aug 22, 2016

👍

@zhengbli zhengbli merged commit edbeab0 into microsoft:master Aug 22, 2016
@zhengbli zhengbli deleted the tolerateConfigError branch August 22, 2016 23:10
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
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.

3 participants