Skip to content
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

Merged
merged 49 commits into from Aug 5, 2020

Conversation

Ericson2314
Copy link
Member

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.

Ericson2314 and others added 29 commits March 15, 2020 11:05
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
src/libstore/build.cc Outdated Show resolved Hide resolved
src/libstore/local-store.cc Outdated Show resolved Hide resolved
std::optional<FixedOutputHash> hash; /* hash used for expected hash computation */
};

struct DerivationOutputFixed
Copy link
Member Author

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?

Comment on lines +32 to +33
FileIngestionMethod method;
HashType hashType;
Copy link
Member Author

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?

Copy link
Member Author

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

@Ericson2314
Copy link
Member Author

Conflicts fixed.

@Ericson2314
Copy link
Member Author

Conflicts fixed

@edolstra edolstra merged commit e48f944 into NixOS:master Aug 5, 2020
@Ericson2314 Ericson2314 deleted the misc-ca branch August 5, 2020 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants