Generalize isFixedOutput in preparation for CA drvs#3418
Merged
edolstra merged 13 commits intoNixOS:masterfrom Aug 5, 2020
Merged
Generalize isFixedOutput in preparation for CA drvs#3418edolstra merged 13 commits intoNixOS:masterfrom
isFixedOutput in preparation for CA drvs#3418edolstra merged 13 commits intoNixOS:masterfrom
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.
edolstra
reviewed
Mar 16, 2020
asymmetric
reviewed
Mar 16, 2020
Contributor
asymmetric
left a comment
There was a problem hiding this comment.
Just some typos in comments.
Thanks @asymmetric! Co-Authored-By: asymmetric <[email protected]>
Thanks @asymmetric I failed to do them all in one batch Co-Authored-By: asymmetric <[email protected]>
thufschmitt
reviewed
Jun 3, 2020
Member
thufschmitt
left a comment
There was a problem hiding this comment.
A couple of comments on this, but overall 👍
Member
Author
|
@regnat Thanks for the review, should all be fixed now. |
Member
Author
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.
Member
Author
edolstra
reviewed
Jul 28, 2020
src/libstore/derivations.cc
Outdated
| }; | ||
| // Since enums can have non-variant values, but making a `default:` would | ||
| // disable exhaustiveness warnings. | ||
| abort(); |
Member
There was a problem hiding this comment.
Could you change this to assert(false)? That way, if we ever hit this assertion, we get an error message with location info.
Member
|
There's a merge conflict in derivations.cc. |
Member
Author
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.
Today's fixed output derivations and regular derivations differ in a few
ways which are largely orthogonal. This replaces
isFixedOutputwith atypethat returns an enum of possible combinations.I think this is basically a tech debt PR --- our plans could change a lot but it's still nice to decompose
isFixedOutputto make the code, especiallybuild.cceasier to read.CC @regnat @edolstra