libstore: parameterize the inputs of Derivation#15968
Open
amaanq wants to merge 2 commits into
Open
Conversation
3f2a8c6 to
a7ced2f
Compare
a7ced2f to
6ae3c9e
Compare
323de16 to
4405c35
Compare
Ericson2314
reviewed
Jun 8, 2026
Ericson2314
reviewed
Jun 8, 2026
Ericson2314
reviewed
Jun 8, 2026
Ericson2314
reviewed
Jun 8, 2026
154bc10 to
0bc72d9
Compare
Ericson2314
reviewed
Jun 8, 2026
Ericson2314
reviewed
Jun 8, 2026
0bec0b8 to
33776f4
Compare
Contributor
|
Tbh I'm a bit on the fence about using designated initialisers for this stuff – in the long run it would be nicer to make the internal representation of Derivation more space efficient (like using flat map / sorted vectors). This seems to be moving us in the opposite direction. Derivation isn't really a class with no invariants. I'm not sure if we should tighten that with a builder pattern before or after - either way it's churn, but I'd prefer that we only have to do the churn of builder pattern + immutable accessors only once. |
xokdvium
reviewed
Jun 9, 2026
33776f4 to
b687473
Compare
b687473 to
994f78e
Compare
Working with templates adds some overhead, but parameterizing the inputs is an important prerequisite for storing the options inside the derivation. Subsequent commits can clean this up significantly. Co-authored-by: Amaan Qureshi <git@amaanq.com>
This is much nicer to read than imperatively mutating fields one by one.
994f78e to
510f635
Compare
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.
Working with templates adds some overhead, but parameterizing the inputs
is an important prerequisite for storing the options inside the derivation.
Subsequent commits can clean this up significantly.