From 8032984de2d7cb4a240a07acf10be1402e504381 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Tue, 8 Oct 2019 13:41:40 -0700 Subject: [PATCH] Revert "Disallow incremental with noEmit" --- src/compiler/program.ts | 4 ---- .../reference/noEmitAndComposite.errors.txt | 19 ------------------ .../reference/noEmitAndComposite.symbols | 4 ---- .../reference/noEmitAndComposite.types | 5 ----- .../reference/noEmitAndIncremental.errors.txt | 20 ------------------- .../reference/noEmitAndIncremental.symbols | 4 ---- .../reference/noEmitAndIncremental.types | 5 ----- tests/cases/compiler/noEmitAndComposite.ts | 10 ---------- tests/cases/compiler/noEmitAndIncremental.ts | 11 ---------- 9 files changed, 82 deletions(-) delete mode 100644 tests/baselines/reference/noEmitAndComposite.errors.txt delete mode 100644 tests/baselines/reference/noEmitAndComposite.symbols delete mode 100644 tests/baselines/reference/noEmitAndComposite.types delete mode 100644 tests/baselines/reference/noEmitAndIncremental.errors.txt delete mode 100644 tests/baselines/reference/noEmitAndIncremental.symbols delete mode 100644 tests/baselines/reference/noEmitAndIncremental.types delete mode 100644 tests/cases/compiler/noEmitAndComposite.ts delete mode 100644 tests/cases/compiler/noEmitAndIncremental.ts diff --git a/src/compiler/program.ts b/src/compiler/program.ts index a33c0a64c3a..0c8444daa2f 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -2929,10 +2929,6 @@ namespace ts { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified)); } - if (options.noEmit && isIncrementalCompilation(options)) { - createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "noEmit", options.incremental ? "incremental" : "composite"); - } - verifyProjectReferences(); // List of collected files is complete; validate exhautiveness if this is a project with a file list diff --git a/tests/baselines/reference/noEmitAndComposite.errors.txt b/tests/baselines/reference/noEmitAndComposite.errors.txt deleted file mode 100644 index fe6de6ae441..00000000000 --- a/tests/baselines/reference/noEmitAndComposite.errors.txt +++ /dev/null @@ -1,19 +0,0 @@ -/tsconfig.json(3,9): error TS5053: Option 'noEmit' cannot be specified with option 'composite'. -/tsconfig.json(4,9): error TS5053: Option 'noEmit' cannot be specified with option 'composite'. - - -==== /tsconfig.json (2 errors) ==== - { - "compilerOptions": { - "noEmit": true, - ~~~~~~~~ -!!! error TS5053: Option 'noEmit' cannot be specified with option 'composite'. - "composite": true - ~~~~~~~~~~~ -!!! error TS5053: Option 'noEmit' cannot be specified with option 'composite'. - } - } - -==== /a.ts (0 errors) ==== - const x = 10; - \ No newline at end of file diff --git a/tests/baselines/reference/noEmitAndComposite.symbols b/tests/baselines/reference/noEmitAndComposite.symbols deleted file mode 100644 index 05c35bcf58a..00000000000 --- a/tests/baselines/reference/noEmitAndComposite.symbols +++ /dev/null @@ -1,4 +0,0 @@ -=== /a.ts === -const x = 10; ->x : Symbol(x, Decl(a.ts, 0, 5)) - diff --git a/tests/baselines/reference/noEmitAndComposite.types b/tests/baselines/reference/noEmitAndComposite.types deleted file mode 100644 index ed892fed2ba..00000000000 --- a/tests/baselines/reference/noEmitAndComposite.types +++ /dev/null @@ -1,5 +0,0 @@ -=== /a.ts === -const x = 10; ->x : 10 ->10 : 10 - diff --git a/tests/baselines/reference/noEmitAndIncremental.errors.txt b/tests/baselines/reference/noEmitAndIncremental.errors.txt deleted file mode 100644 index c257e9ba540..00000000000 --- a/tests/baselines/reference/noEmitAndIncremental.errors.txt +++ /dev/null @@ -1,20 +0,0 @@ -/tsconfig.json(3,9): error TS5053: Option 'noEmit' cannot be specified with option 'incremental'. -/tsconfig.json(4,9): error TS5053: Option 'noEmit' cannot be specified with option 'incremental'. - - -==== /tsconfig.json (2 errors) ==== - { - "compilerOptions": { - "noEmit": true, - ~~~~~~~~ -!!! error TS5053: Option 'noEmit' cannot be specified with option 'incremental'. - "incremental": true - ~~~~~~~~~~~~~ -!!! error TS5053: Option 'noEmit' cannot be specified with option 'incremental'. - } - } - - -==== /a.ts (0 errors) ==== - const x = 10; - \ No newline at end of file diff --git a/tests/baselines/reference/noEmitAndIncremental.symbols b/tests/baselines/reference/noEmitAndIncremental.symbols deleted file mode 100644 index 05c35bcf58a..00000000000 --- a/tests/baselines/reference/noEmitAndIncremental.symbols +++ /dev/null @@ -1,4 +0,0 @@ -=== /a.ts === -const x = 10; ->x : Symbol(x, Decl(a.ts, 0, 5)) - diff --git a/tests/baselines/reference/noEmitAndIncremental.types b/tests/baselines/reference/noEmitAndIncremental.types deleted file mode 100644 index ed892fed2ba..00000000000 --- a/tests/baselines/reference/noEmitAndIncremental.types +++ /dev/null @@ -1,5 +0,0 @@ -=== /a.ts === -const x = 10; ->x : 10 ->10 : 10 - diff --git a/tests/cases/compiler/noEmitAndComposite.ts b/tests/cases/compiler/noEmitAndComposite.ts deleted file mode 100644 index 849fdb04da1..00000000000 --- a/tests/cases/compiler/noEmitAndComposite.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @Filename: /a.ts -const x = 10; - -// @Filename: /tsconfig.json -{ - "compilerOptions": { - "noEmit": true, - "composite": true - } -} diff --git a/tests/cases/compiler/noEmitAndIncremental.ts b/tests/cases/compiler/noEmitAndIncremental.ts deleted file mode 100644 index 0349496c1ef..00000000000 --- a/tests/cases/compiler/noEmitAndIncremental.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @Filename: /a.ts -const x = 10; - -// @Filename: /tsconfig.json -{ - "compilerOptions": { - "noEmit": true, - "incremental": true - } -} -