[rush] Look for :incremental
suffixed scripts in watch mode
#4960
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.
Summary
Changes the algorithm for executing phased commands in watch mode to prefer a script named
_phase:<name>:incremental
for every iteration after the first. The typical scenario for such would be to omit cleaning from an incremental run.Details
The build cache will still treat the
:incremental
commands as having the same cache key as the non-incremental command, so later iterations can still encounter cache hits. However, cache writes do not occur in iterations after the first.How it was tested
Temporarily added a
_phase:build:incremental
to a project and ranrush start
. Validated that the_phase:build:incremental
script was used for the second iteration. Validated that modifying inputs back to a state known to be present in the cache resulted in a cache hit.Impacted documentation
Documentation on phased commands.