Skip to content

Fix empty files diagnostics reporting#26865

Merged
sheetalkamat merged 5 commits into
microsoft:masterfrom
csantos42:bugs/fix-empty-files-diagnostics
Sep 11, 2018
Merged

Fix empty files diagnostics reporting#26865
sheetalkamat merged 5 commits into
microsoft:masterfrom
csantos42:bugs/fix-empty-files-diagnostics

Conversation

@csantos42
Copy link
Copy Markdown
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
Comment thread src/compiler/commandLineParser.ts Outdated
Comment thread src/compiler/commandLineParser.ts Outdated
Comment thread src/compiler/commandLineParser.ts Outdated
@csantos42
Copy link
Copy Markdown
Contributor Author

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

@sheetalkamat sheetalkamat merged commit 08c970a into microsoft:master Sep 11, 2018
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
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