Skip to content

[rush] Separate Skip and Build Cache, add flag#7

Merged
chengcyber merged 1 commit into
chengcyber:feat-cobuildfrom
dmichon-msft:build-cache-opt-in
Aug 30, 2023
Merged

[rush] Separate Skip and Build Cache, add flag#7
chengcyber merged 1 commit into
chengcyber:feat-cobuildfrom
dmichon-msft:build-cache-opt-in

Conversation

@dmichon-msft
Copy link
Copy Markdown

Summary

Adds an explicit opt-in flag cacheable to the IOperationRunner interface. Implementations that set it to true will get skip detection and build cache behavior. Implementations that set it to false will not. However, build cache will still propagate cache write safety across such operations.

Details

Splits out the LegacySkipPlugin from the CacheableOperationPlugin. The legacy skip behavior will now be completely disabled if the build cache is enabled, or the only logic running.

Consolidates reading of the rush-project.json files into the startup of the build. This front-loads any issues encountered with the config files.

Removes the commandToRun public property on IOperationRunner in favor of a general getConfigHash(): string method that serves the same function of providing an opaque representation of the configuration to be fed to the build cache hash or stored in the legacy project-deps file.

Front-loads the calculation of which operations do not support the build cache so that references to the RushProjectConfiguration instances can be all in one place and less data needs to be ferried around.

How it was tested

Local builds using the modified code.

Impacted documentation

Plugin authoring.

@chengcyber chengcyber merged commit d0a40f1 into chengcyber:feat-cobuild Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants