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.
This PR fixes an issue where calling
brioche build --sync
would end up missing some recipes while syncing. The result was that running e.g.brioche install -r eza
would end up needing to build the Rust crate, even though the latest version had been built and synced frombrioche-packages
This was caused by the function
brioche_core::references::recipe_references
missing recipes in some cases.Basically, this function wouldn't return child recipes directly, but would skip straight to returning the grandchild recipe dependencies-- effectively skipping a layer of dependencies. If this skipped layer included "expensive" recipes, then that would lead to cases like those seen withUpdate: I spent quite a bit of time trying to write a unit test for this issue, but I wasn't able to reproduce it. So, I'm not exactly sure what exact conditions are needed to cause the issue (but I was able to reliably trigger it with the current version of theeza
where the user would end up baking the expensive recipes manuallyeza
package)This new change makes recipe syncing slightly slower (~1.5s to ~3s for
eza
when testing locally), but this new implementation should be more correctInternally, this change makes it so recipes can either be referenced by hash or referenced directly, which helps when trying to fetch referenced recipes from the database (i.e. no need to fetch a recipe if it's just nested within another recipe)