diff --git a/common/changes/@microsoft/rush/fix-legacy-incremental-building_2024-11-06-17-29.json b/common/changes/@microsoft/rush/fix-legacy-incremental-building_2024-11-06-17-29.json new file mode 100644 index 00000000000..4b1c475d3c5 --- /dev/null +++ b/common/changes/@microsoft/rush/fix-legacy-incremental-building_2024-11-06-17-29.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@microsoft/rush", + "comment": "Fix an issue where incremental building (with LegacySkipPlugin) would not work when no-op operations were present in the process", + "type": "none" + } + ], + "packageName": "@microsoft/rush" +} \ No newline at end of file diff --git a/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts b/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts index 651ec7849f8..0e3a02fadbe 100644 --- a/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts +++ b/libraries/rush-lib/src/logic/operations/LegacySkipPlugin.ts @@ -79,7 +79,7 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { const { operation } = record; const { associatedProject, runner, logFilenameIdentifier } = operation; if (!associatedProject || !runner) { - return; + continue; } if (!runner.cacheable) { @@ -88,7 +88,7 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { packageDeps: undefined, packageDepsPath: '' }); - return; + continue; } const packageDepsFilename: string = `package-deps_${logFilenameIdentifier}.json`; @@ -109,7 +109,7 @@ export class LegacySkipPlugin implements IPhasedCommandPlugin { if (!fileHashes) { logGitWarning = true; - return; + continue; } const files: Record = {};