[rush-lib] Proposal: Rework interaction between Build Cache and TaskRunner #3029
Labels
design proposal
A new direction that is complex enough to have open questions but specific enough to implement
Current State
Currently reads from and writes to the build cache are treated as part of the execution of a single task in the project graph. This has the following undesirable effects:
tar
utility. For large projects this can sometimes introduce several minute stalls.Proposed Solution
I propose we rework the way the build cache interacts with the task runner to do the following:
Generalization
To allow the build cache layer to operate as a plugin, the following hooks will suffice:
Limitations
The "afterCreateTasks" hook requires all queries to the build cache to execute before any tasks start executing, which may increase the startup time when interacting with a cloud build cache with no cache hits.
Interaction with Phased Builds (#2300)
Phased builds purely alter the scope of a single "build" task in the compilation, so all benefits of this proposal will carry over to the finer-grained scheduling of the phased builds proposal.
The text was updated successfully, but these errors were encountered: