-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Conversation
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]) }; |
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.
do you still need the succeeded property? it seems that now we are handling the two branches identically.
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.
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.
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.
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..
110b5df
to
a8ab52f
Compare
👍 |
Fixes #9577
Now uses the TypeScript parser to parse tsconfig.json to be more tolerating