-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Make sure commandline options are absolute paths so they dont conflict with options from tsbuild info #34403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,42 @@ | ||
namespace ts { | ||
describe("unittests:: tsc:: incremental::", () => { | ||
verifyTscIncrementalEdits({ | ||
scenario: "incremental", | ||
subScenario: "when passing filename for buildinfo on commandline", | ||
fs: () => loadProjectFromFiles({ | ||
"/src/project/src/main.ts": "export const x = 10;", | ||
"/src/project/tsconfig.json": utils.dedent` | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
}, | ||
"include": [ | ||
"src/**/*.ts" | ||
] | ||
}`, | ||
}), | ||
commandLineArgs: ["--incremental", "--p", "src/project", "--tsBuildInfoFile", "src/project/.tsbuildinfo"], | ||
incrementalScenarios: [{ | ||
buildKind: BuildKind.IncrementalDtsUnchanged, | ||
modifyFs: noop, | ||
}] | ||
}); | ||
|
||
verifyTsc({ | ||
scenario: "incremental", | ||
subScenario: "when passing rootDir from commandline", | ||
fs: () => loadProjectFromFiles({ | ||
"/src/project/src/main.ts": "export const x = 10;", | ||
"/src/project/tsconfig.json": utils.dedent` | ||
{ | ||
"compilerOptions": { | ||
"incremental": true, | ||
"outDir": "dist", | ||
}, | ||
}`, | ||
}), | ||
commandLineArgs: ["--p", "src/project", "--rootDir", "src/project/src"], | ||
}); | ||
}); | ||
} |
This file contains hidden or 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
6 changes: 6 additions & 0 deletions
6
...cremental-declaration-doesnt-change/when-passing-filename-for-buildinfo-on-commandline.js
This file contains hidden or 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,6 @@ | ||
//// [/lib/incremental-declaration-doesnt-changeOutput.txt] | ||
/lib/tsc --incremental --p src/project --tsBuildInfoFile src/project/.tsbuildinfo | ||
exitCode:: 0 | ||
|
||
|
||
//// [/src/project/.tsbuildinfo] file written with same contents |
42 changes: 42 additions & 0 deletions
42
...rence/tsc/incremental/initial-build/when-passing-filename-for-buildinfo-on-commandline.js
This file contains hidden or 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,42 @@ | ||
//// [/lib/initial-buildOutput.txt] | ||
/lib/tsc --incremental --p src/project --tsBuildInfoFile src/project/.tsbuildinfo | ||
exitCode:: 0 | ||
|
||
|
||
//// [/src/project/.tsbuildinfo] | ||
{ | ||
"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; };", | ||
"signature": "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; };" | ||
}, | ||
"./src/main.ts": { | ||
"version": "-10726455937-export const x = 10;", | ||
"signature": "-6057683066-export declare const x = 10;\r\n" | ||
} | ||
}, | ||
"options": { | ||
"target": 1, | ||
"module": 1, | ||
"incremental": true, | ||
"project": "./", | ||
"tsBuildInfoFile": "./.tsbuildinfo", | ||
"configFilePath": "./tsconfig.json" | ||
}, | ||
"referencedMap": {}, | ||
"exportedModulesMap": {}, | ||
"semanticDiagnosticsPerFile": [ | ||
"../../lib/lib.d.ts", | ||
"./src/main.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
|
||
//// [/src/project/src/main.js] | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.x = 10; | ||
|
||
|
41 changes: 41 additions & 0 deletions
41
...aselines/reference/tsc/incremental/initial-build/when-passing-rootDir-from-commandline.js
This file contains hidden or 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,41 @@ | ||
//// [/lib/initial-buildOutput.txt] | ||
/lib/tsc --p src/project --rootDir src/project/src | ||
exitCode:: 0 | ||
|
||
|
||
//// [/src/project/dist/main.js] | ||
"use strict"; | ||
exports.__esModule = true; | ||
exports.x = 10; | ||
|
||
|
||
//// [/src/project/tsconfig.tsbuildinfo] | ||
{ | ||
"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; };", | ||
"signature": "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; };" | ||
}, | ||
"./src/main.ts": { | ||
"version": "-10726455937-export const x = 10;", | ||
"signature": "-6057683066-export declare const x = 10;\r\n" | ||
} | ||
}, | ||
"options": { | ||
"incremental": true, | ||
"outDir": "./dist", | ||
"project": "./", | ||
"rootDir": "./src", | ||
"configFilePath": "./tsconfig.json" | ||
}, | ||
"referencedMap": {}, | ||
"exportedModulesMap": {}, | ||
"semanticDiagnosticsPerFile": [ | ||
"../../lib/lib.d.ts", | ||
"./src/main.ts" | ||
] | ||
}, | ||
"version": "FakeTSVersion" | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't the main loop already run
toAbsolutePath
onconfigFilePath
with all the other properties?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
configFilePath
is not inoptionDeclarations
so it wont get normalized.