Add listFilesOnly command-line option

Msbuild currently uses a combination of `--listFiles` and `--noEmit` to
obtain a list of files to be consumed by tsc.  However, these two flags
don't suppress type checking, the results of which msbuild will never
consume.  This new switch gives msbuild a faster way to obtain the file
list.

Note: like `--noEmit`, doesn't make sense in build mode.
This commit is contained in:
Andrew Casey
2019-10-17 16:36:50 -07:00
parent a8dc7af271
commit caf0041f8a
13 changed files with 81 additions and 19 deletions
+5
View File
@@ -207,6 +207,11 @@ namespace ts {
return sys.exit(ExitStatus.Success);
}
if (commandLine.options.watch && commandLine.options.listFilesOnly) {
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Options_0_and_1_cannot_be_combined, "watch", "listFilesOnly"));
return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
}
if (commandLine.options.project) {
if (commandLine.fileNames.length !== 0) {
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line));