Skip to content

Fix empty files diagnostics reporting #26865

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

Merged

Conversation

csantos42
Copy link
Contributor

Fixes #26779
Fixes #26780

This PR aligns the diagnostic reporting for empty files with the behavior described in the handbook:

Note that starting with 3.0, it is no longer an error to have an empty files array if you have at least one reference in a tsconfig.json file.

Specifically, the following 3 issues are addressed by this PR:

  • The command-line parser logs errors whenever files is empty, regardless of the value of references
  • The configFileParsingDiagnostics are not being passed to createProgram from buildSingleProject, meaning any parsing errors will go unreported
  • For the queue of projects being processed in buildAllProjects, errors will go unreported if the for-loop iteration is continued because the errors are reported in buildSingleProject, which is at the end of the loop iteration

Unit tests are included to account for the new behavior.

@csantos42 csantos42 changed the title Bugs/fix empty files diagnostics Fix empty files diagnostics reporting Sep 4, 2018
@csantos42
Copy link
Contributor Author

Thanks for the review @sheetalkamat — are we ready to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants