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.
The
WithMeta
type is used to track the stack trace a recipe was created in TypeScript: since recipe evaluation is lazy, it can be really hard to track this down from just the recipes themselves. This metadata isn't used at all in Brioche today, but the eventual goal is to give better error messages (e.g. when a build fails, we could point to the line in TypeScript where the error occurred)Turns out, this metadata wasn't properly being deserialized when going from TypeScript to Rust, so it always came back empty. This PR fixes that, and makes a few changes so the
WithMeta<_>
wrapper type is a bit simpler:serde::Deserialize
impl onWithMeta<_>
to try and deserialize themeta
field (serialization still skips it). This also means the type thatWithMeta
wraps must now deserialize from an objectWithMeta
for directory entries in theDirectory
type. Since these are string values (representing recipe hashes), this no longer worked with the deserialization changes toWithMeta