Draft
Conversation
79fc9f6 to
cdbbc69
Compare
88e2bda to
4c8736c
Compare
4c8736c to
e4c7e89
Compare
|
🎉 All dependencies have been resolved ! |
f0d1e1a to
33e945b
Compare
The git fetcher is now more tree-hash-oriented, and we will want to integrate this with git fetching eventually. This PR exposes `treeHash` inputs and outputs in a few ways for this purpose. Eventually, we should add something like `builtins.derivation`'s `outputHashMode` to `builtins.fetchTree`, in order to specify we should use git hashing, and then this and the store-layer git hashing should meet together, ensuring we have the same tree hash end-to-end. Part of RFC 133 Co-Authored-By: Matthew Bauer <[email protected]> Co-Authored-By: Carlo Nucera <[email protected]> Co-authored-by: Robert Hensing <[email protected]>
33e945b to
a8314ff
Compare
Member
They already meet, and they involve a transformation that turns git trees without submodules and filtering into git trees where those things are resolved. Could you clarify what "meeting" entails and how we benefit from that? |
roberth
reviewed
Mar 27, 2024
| if (auto narHash = input.getNarHash()) { | ||
| attrs.alloc("narHash").mkString(narHash->to_string(HashFormat::SRI, true)); | ||
| } else if (auto treeHash = input.getTreeHash()) { | ||
| attrs.alloc("treeHash").mkString(treeHash->to_string(HashFormat::SRI, true)); |
Member
There was a problem hiding this comment.
We have two kinds of tree hashes:
- tree hashes from git commits, which do not correspond to fetched trees in general
- tree hashes from file system objects returned by
fetchTree
Which one is this, and what is the purpose of exposing it to the expression language?
roberth
suggested changes
Mar 27, 2024
Member
roberth
left a comment
There was a problem hiding this comment.
- The meaning of the tree hash must be unambiguous.
- We need a concrete benefit to users before exposing arbitrary data to the expression language.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
The git fetcher is now more tree-hash-oriented, and we will want to integrate this with git fetching eventually. This PR exposes
treeHashinputs and outputs in a few ways for this purpose.Eventually, we should add something like
builtins.derivation'soutputHashModetobuiltins.fetchTree, in order to specify we should use git hashing, and then this and the store-layer git hashing should meet together, ensuring we have the same tree hash end-to-end.Context
Part of RFC 133
Tracking issue #8919
depends on #8918Priorities
Add 👍 to pull requests you find important.