-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Store change file set instead of hasPendingChange to be able to reuse…
… the information
- Loading branch information
1 parent
1a8abac
commit 59f2b5c
Showing
13 changed files
with
533 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
177 changes: 177 additions & 0 deletions
177
.../reference/tsbuild/configFileErrors/reports-syntax-errors-in-config-file-discrepancies.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
0:: reports syntax errors after change to config file | ||
During incremental build, tsbuildinfo is not emitted, so declaration option is not present | ||
Clean build has declaration option in tsbuildinfo | ||
TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: | ||
CleanBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "4646078106-export function foo() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true, | ||
"declaration": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
IncrementalBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "4646078106-export function foo() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
1:: reports syntax errors after change to ts file | ||
During incremental build, tsbuildinfo is not emitted, so declaration option is not present | ||
Clean build has declaration option in tsbuildinfo | ||
TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: | ||
CleanBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "9819159940-export function foo() { }export function fooBar() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true, | ||
"declaration": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
IncrementalBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "4646078106-export function foo() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
2:: no-change-run | ||
During incremental build, tsbuildinfo is not emitted, so declaration option is not present | ||
Clean build has declaration option in tsbuildinfo | ||
TsBuild info text without affectedFilesPendingEmit:: /src/tsconfig.tsbuildinfo.readable.baseline.txt:: | ||
CleanBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "9819159940-export function foo() { }export function fooBar() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true, | ||
"declaration": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
IncrementalBuild: | ||
{ | ||
"program": { | ||
"fileInfos": { | ||
"../lib/lib.d.ts": { | ||
"version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", | ||
"affectsGlobalScope": true | ||
}, | ||
"./a.ts": { | ||
"version": "4646078106-export function foo() { }" | ||
}, | ||
"./b.ts": { | ||
"version": "1045484683-export function bar() { }" | ||
} | ||
}, | ||
"options": { | ||
"composite": true | ||
}, | ||
"referencedMap": {}, | ||
"changeFileSet": [ | ||
"../lib/lib.d.ts", | ||
"./a.ts", | ||
"./b.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.