-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use StorePathDescriptor
to fetching from CA-only stores
#3754
base: master
Are you sure you want to change the base?
Conversation
to put in a set, we need an ordering
src/libstore/local-store.cc
Outdated
auto dstPath = makeFixedOutputPath(name, FixedOutputInfo { | ||
method, | ||
h, | ||
{}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you not have references with addToStoreFromDump?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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 adds a
StorePathDescriptor
, which is likeContentAddress
but 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
StorePathDescriptor
as an alternative toStorePath
in 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