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
Mischellaneous changes to prepare for CA drvs -- contains #3807, #3424, and #3418 #3830
Conversation
Today's fixed output derivations and regular derivations differ in a few ways which are largely orthogonal. This replaces `isFixedOutput` with a `type` that returns an enum of possible combinations.
Thanks @asymmetric! Co-Authored-By: asymmetric <lorenzo@mailbox.org>
Thanks @asymmetric I failed to do them all in one batch Co-Authored-By: asymmetric <lorenzo@mailbox.org>
See documentattion in header and comments in implementation for details. This is actually done in preparation for floating ca derivations, not multi-output fixed ca derivations, but the distinction doesn't yet mattter. Thanks @cole-h for finding and fixing a bunch of typos.
Co-Authored-By: Cole Helbling <cole.e.helbling@outlook.com>
I think this is clearer
When we merge with master, the new lack of string types make this case impossible (after parsing). Later, when we actually implemenent CA-derivations, we'll change the types to allow that.
N.B. not using `std::visit` for fetchurl because there is no attempt to handle all the cases (e.g. no `else`) and lambda complicates early return.
We've added the variant to `DerivationOutput` to support them, but made `DerivationOutput::path` partial to avoid actually implementing them. With this chage, we can all collaborate on "just" removing `DerivationOutput::path` calls to implement CA derivations.
…idiansystems/nix into ca-derivation-data-types
…n2314/nix into misc-ca
This reverts commit 3804e3d.
This reverts commit 74b251b.
This reverts commit 3a9e4c3.
src/libstore/derivations.hh
Outdated
std::optional<FixedOutputHash> hash; /* hash used for expected hash computation */ | ||
}; | ||
|
||
struct DerivationOutputFixed |
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.
Should the variant be only of new types, or should it include old ones if they are 1-1?
FileIngestionMethod method; | ||
HashType hashType; |
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.
Should we actually have this flexibility, or should we just enforce NAR-sha256?
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.
If we do remove these fields, we can still encode drv files in a way that allows for adding them later
…/nix into misc-ca
…systems/nix into misc-ca
…systems/nix into ca-derivation-data-types
Conflicts fixed. |
Conflicts fixed |
This doesn't actually implement any new features, 😲. What it does do is adjusting existing code to better take advantage of the new variants. I hope by essentially "pushing down" the
throw Error("not implemented")
closer to where the algorithsm actually need to be generalized, it becomes easier for people to tackle them independently.