Use StorePathDescriptor to fetching from CA-only stores#3754
Draft
Ericson2314 wants to merge 97 commits intoNixOS:masterfrom
Draft
Use StorePathDescriptor to fetching from CA-only stores#3754Ericson2314 wants to merge 97 commits intoNixOS:masterfrom
StorePathDescriptor to fetching from CA-only stores#3754Ericson2314 wants to merge 97 commits intoNixOS:masterfrom
Conversation
to put in a set, we need an ordering
Ericson2314
added a commit
to obsidiansystems/nix
that referenced
this pull request
Jun 29, 2020
src/libstore/local-store.cc
Outdated
| auto dstPath = makeFixedOutputPath(name, FixedOutputInfo { | ||
| method, | ||
| h, | ||
| {}, |
Member
There was a problem hiding this comment.
Can you not have references with addToStoreFromDump?
Member
Author
There was a problem hiding this comment.
@matthewbauer I would say all those new {} are things that probably deserve auditing :)
…ix into store-path-or-ca
LegacyContentAddress used for all other usages
|
🎉 All dependencies have been resolved ! |
StorePathDescriptor to fetching from CA-only stores --- contains #3746
StorePathDescriptor to fetching from CA-only stores --- contains #3746StorePathDescriptor to fetching from CA-only stores
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.
This adds a
StorePathDescriptor, which is likeContentAddressbut additionally contains everything needed to create a store path. As such, it is like a combination of a name, aStorePath, and ValidPathInfo's "CA" and "References" fields, but without the other extraneous metadata fromValidPathInfo(such as timestamps or information that can be calculated from this).The motivation is multi-fold:
Be more cautious with references. When we just pass around
ContentAddress, is easier to forget about CA data with references. With the ca-derivations work, we hope those become commonplace, and we want to support them right.Have
StorePathDescriptoras an alternative toStorePathin internal interfaces. The idea is just a small step beyond Try to substitute builtins.fetch* #3721 and similar PRs, which have lots ofStorePath, std::optional<ContentAddress>in arguments, and instead dostd::variant<StorePath, StorePathDescriptor>.Eventually, do cross-store-dir substitutions of ca-references data, as when the store paths have the same length this should be possible.
Add a new variant to
StorePathDescriptor, corresponding to<drv-path>!<output-name>syntax, so we have a way to refer to the yet-unbuilt outputs of CA derivations.depends on #3746