Sync process
recipes to avoid fetching unnecessary dependencies
#56
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.
See this Zulip discussion for some background context: https://brioche.zulipchat.com/#narrow/stream/440653-general/topic/Why.20so.20slow.3F/near/442990093
When running the snippet to download "hello world" on the brioche.dev landing page (
brioche run -r hello_world
), it would take a long time to run, because it would end up downloading all of the inputs used to buildhello_world
(even though these were never used at runtime). This was caused by a split betweenprocess
andcomplete_process
recipes (complete_process
is an implementation detail so that even if the input recipes of a process recipe change, it can still be a cache hit as long as those recipes bake to the same artifacts of another process recipe).Basically, we were only caching the inner
complete_process
recipe, which in turn meant that clients would end up trying to bake all of the inputs of the outerprocess
recipe, which is why all the dependencies would be fetched.This PR changes it so that both
process
andcomplete_process
get synced to the registry from now on. This should make it so the next time thebrioche-packages
repo gets synced, it should automatically cache the missingprocess
recipes. However, this won't retroactively fix existing clients, since they would never even check the cache forprocess
recipes.