mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-14 19:16:17 -06:00
Incremental false with composite not allowed
This commit is contained in:
parent
46ddbff7b1
commit
df9da15abb
@ -4028,6 +4028,10 @@
|
||||
"category": "Message",
|
||||
"code": 6378
|
||||
},
|
||||
"Composite projects may not disable incremental compilation.": {
|
||||
"category": "Error",
|
||||
"code": 6379
|
||||
},
|
||||
|
||||
"The expected type comes from property '{0}' which is declared here on type '{1}'": {
|
||||
"category": "Message",
|
||||
|
||||
@ -2720,6 +2720,9 @@ namespace ts {
|
||||
if (options.declaration === false) {
|
||||
createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration");
|
||||
}
|
||||
if (options.incremental === false) {
|
||||
createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration");
|
||||
}
|
||||
}
|
||||
|
||||
verifyProjectReferences();
|
||||
|
||||
@ -416,10 +416,20 @@ namespace ts {
|
||||
modifyFs: noop
|
||||
});
|
||||
|
||||
// Verify baseline with and without build info
|
||||
// Verify baseline with build info
|
||||
verifyOutFileScenario({
|
||||
scenario: "when final project is not composite but uses project references",
|
||||
modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""),
|
||||
ignoreWithoutBuildInfo: true,
|
||||
ignoreDtsChanged: true,
|
||||
ignoreDtsUnchanged: true,
|
||||
baselineOnly: true
|
||||
});
|
||||
|
||||
// Verify baseline with and without build info
|
||||
verifyOutFileScenario({
|
||||
scenario: "when final project is not composite but incremental",
|
||||
modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, `"incremental": true,`),
|
||||
ignoreDtsChanged: true,
|
||||
ignoreDtsUnchanged: true,
|
||||
baselineOnly: true
|
||||
|
||||
@ -0,0 +1,7 @@
|
||||
error TS6304: Composite projects may not disable declaration emit.
|
||||
|
||||
|
||||
!!! error TS6304: Composite projects may not disable declaration emit.
|
||||
==== tests/cases/compiler/optionsCompositeWithIncrementalFalse.ts (0 errors) ====
|
||||
const x = "Hello World";
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
//// [optionsCompositeWithIncrementalFalse.ts]
|
||||
const x = "Hello World";
|
||||
|
||||
|
||||
//// [optionsCompositeWithIncrementalFalse.js]
|
||||
var x = "Hello World";
|
||||
|
||||
|
||||
//// [optionsCompositeWithIncrementalFalse.d.ts]
|
||||
declare const x = "Hello World";
|
||||
@ -0,0 +1,4 @@
|
||||
=== tests/cases/compiler/optionsCompositeWithIncrementalFalse.ts ===
|
||||
const x = "Hello World";
|
||||
>x : Symbol(x, Decl(optionsCompositeWithIncrementalFalse.ts, 0, 5))
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
=== tests/cases/compiler/optionsCompositeWithIncrementalFalse.ts ===
|
||||
const x = "Hello World";
|
||||
>x : "Hello World"
|
||||
>"Hello World" : "Hello World"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1431,7 +1431,7 @@ sourceFile:../../third_part1.ts
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
|
||||
"incremental": true,
|
||||
"removeComments": true,
|
||||
"strict": false,
|
||||
"sourceMap": true,
|
||||
@ -0,0 +1,4 @@
|
||||
// @composite: true
|
||||
// @incremental: false
|
||||
|
||||
const x = "Hello World";
|
||||
Loading…
x
Reference in New Issue
Block a user