mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-11 17:41:26 -06:00
Remove tsbuildInfo specification error now that we need it for non incremental scenarios as well and there is no way to disable it (#59960)
This commit is contained in:
parent
02b07a1788
commit
49ad1a3917
@ -4649,10 +4649,6 @@
|
||||
"category": "Error",
|
||||
"code": 5110
|
||||
},
|
||||
"Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.": {
|
||||
"category": "Error",
|
||||
"code": 5111
|
||||
},
|
||||
|
||||
"Generates a sourcemap for each corresponding '.d.ts' file.": {
|
||||
"category": "Message",
|
||||
|
||||
@ -499,8 +499,7 @@ export function getTsBuildInfoEmitOutputFilePath(options: CompilerOptions): stri
|
||||
return buildInfoExtensionLess + Extension.TsBuildInfo;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function canEmitTsBuildInfo(options: CompilerOptions): boolean {
|
||||
function canEmitTsBuildInfo(options: CompilerOptions) {
|
||||
return isIncrementalCompilation(options) || !!options.tscBuild;
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,6 @@ import {
|
||||
AsExpression,
|
||||
BuilderProgram,
|
||||
CancellationToken,
|
||||
canEmitTsBuildInfo,
|
||||
canHaveDecorators,
|
||||
canHaveIllegalDecorators,
|
||||
chainDiagnosticMessages,
|
||||
@ -4341,12 +4340,7 @@ export function createProgram(rootNamesOrOptions: readonly string[] | CreateProg
|
||||
}
|
||||
|
||||
const outputFile = options.outFile;
|
||||
if (options.tsBuildInfoFile) {
|
||||
if (!canEmitTsBuildInfo(options)) {
|
||||
createDiagnosticForOptionName(Diagnostics.Option_tsBuildInfoFile_cannot_be_specified_without_specifying_option_incremental_or_composite_or_if_not_running_tsc_b, "tsBuildInfoFile");
|
||||
}
|
||||
}
|
||||
else if (options.incremental && !outputFile && !options.configFilePath) {
|
||||
if (!options.tsBuildInfoFile && options.incremental && !outputFile && !options.configFilePath) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_incremental_can_only_be_specified_using_tsconfig_emitting_to_single_file_or_when_option_tsBuildInfoFile_is_specified));
|
||||
}
|
||||
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
error TS5111: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.
|
||||
|
||||
|
||||
!!! error TS5111: Option 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.
|
||||
==== optionsTsBuildInfoFileWithoutIncrementalAndComposite.ts (0 errors) ====
|
||||
const x = "Hello World";
|
||||
|
||||
@ -34,14 +34,6 @@ declare const console: { log(msg: any): void; };
|
||||
|
||||
/home/src/tslibs/TS/Lib/tsc.js --composite false
|
||||
Output::
|
||||
[96mtsconfig.json[0m:[93m6[0m:[93m5[0m - [91merror[0m[90m TS5111: [0mOption 'tsBuildInfoFile' cannot be specified without specifying option 'incremental' or 'composite' or if not running 'tsc -b'.
|
||||
|
||||
[7m6[0m "tsBuildInfoFile": "tsconfig.json.tsbuildinfo"
|
||||
[7m [0m [91m ~~~~~~~~~~~~~~~~~[0m
|
||||
|
||||
|
||||
Found 1 error in tsconfig.json[90m:6[0m
|
||||
|
||||
|
||||
|
||||
//// [/home/src/workspaces/project/src/main.js]
|
||||
@ -52,4 +44,4 @@ exports.x = 10;
|
||||
|
||||
|
||||
|
||||
exitCode:: ExitStatus.DiagnosticsPresent_OutputsGenerated
|
||||
exitCode:: ExitStatus.Success
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user