mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Do not schedule updating bundle if the buildInfo file wont be generated for the project
Fixes #30346
This commit is contained in:
@@ -1012,9 +1012,9 @@ namespace ts {
|
||||
return;
|
||||
}
|
||||
|
||||
const buildResult = status.type === UpToDateStatusType.OutOfDateWithPrepend ?
|
||||
updateBundle(resolved) : // Fake that files have been built by manipulating prepend and existing output
|
||||
buildSingleProject(resolved); // Actual build
|
||||
const buildResult = needsBuild(status, resolved) ?
|
||||
buildSingleProject(resolved) : // Actual build
|
||||
updateBundle(resolved); // Fake that files have been built by manipulating prepend and existing output
|
||||
if (buildResult & BuildResultFlags.AnyErrors) return;
|
||||
|
||||
const { referencingProjectsMap, buildQueue } = getGlobalDependencyGraph();
|
||||
@@ -1424,9 +1424,10 @@ namespace ts {
|
||||
continue;
|
||||
}
|
||||
|
||||
const buildResult = status.type === UpToDateStatusType.OutOfDateWithPrepend && !options.force ?
|
||||
updateBundle(next) : // Fake that files have been built by manipulating prepend and existing output
|
||||
buildSingleProject(next); // Actual build
|
||||
const buildResult = needsBuild(status, next) ?
|
||||
buildSingleProject(next) : // Actual build
|
||||
updateBundle(next); // Fake that files have been built by manipulating prepend and existing output
|
||||
|
||||
anyFailed = anyFailed || !!(buildResult & BuildResultFlags.AnyErrors);
|
||||
}
|
||||
reportErrorSummary();
|
||||
@@ -1440,6 +1441,15 @@ namespace ts {
|
||||
return anyFailed ? ExitStatus.DiagnosticsPresent_OutputsSkipped : ExitStatus.Success;
|
||||
}
|
||||
|
||||
function needsBuild(status: UpToDateStatus, configFile: ResolvedConfigFileName) {
|
||||
if (status.type !== UpToDateStatusType.OutOfDateWithPrepend || options.force) return true;
|
||||
const config = parseConfigFile(configFile);
|
||||
return !config ||
|
||||
config.fileNames.length === 0 ||
|
||||
!!config.errors.length ||
|
||||
!isIncrementalCompilation(config.options);
|
||||
}
|
||||
|
||||
function reportParseConfigFileDiagnostic(proj: ResolvedConfigFileName) {
|
||||
reportAndStoreErrors(proj, [configFileCache.getValue(proj) as Diagnostic]);
|
||||
}
|
||||
|
||||
@@ -322,12 +322,11 @@ namespace ts {
|
||||
modifyFs: noop
|
||||
});
|
||||
|
||||
// Verify baseline with build info
|
||||
// Verify baseline with build info + dts unChanged
|
||||
verifyOutFileScenario({
|
||||
scenario: "when final project is not composite but uses project references",
|
||||
modifyFs: fs => replaceText(fs, sources[project.third][source.config], `"composite": true,`, ""),
|
||||
ignoreDtsChanged: true,
|
||||
ignoreDtsUnchanged: true,
|
||||
baselineOnly: true
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user