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.
Motivation
DerivationGoal
now only tracks a single output, and is back to tracking a plain store pathdrvPath
, not a deriving path one. ItsaddWantedOutputs
method is gone. These changes will allow subsequent PRs to simplify it greatly.Because the purpose of each goal is back to being immutable, we can also once again make
Goal::buildResult
a public field, and get rid of thegetBuildResult
method. This simplifies things also.DerivationCreationAndRealisationGoal
is a cheap "trampoline" goal. It takes immutable sets of wanted outputs, and just kicks ofDerivationGoal
s for them. Since now "actual work" is done in these goals, it is not wasteful to have separate ones for separate sets of outputs, even if those outputs (and the derivations they are from) overlap.This separation of concerns will make it possible for future work on issues like #11928, and to continue the path of having more goal types, but each goal type does fewer things (issue #12628).
Context
This commit in some sense reverts f4f28cd, but that one kept around
addWantedOutputs
. I am quite sure it was having two layers of goals withaddWantedOutputs
that caused the issues --- restarting logic likeaddWantedOutputs
has is very tempermental! In this version of the change, we have zero layers ofaddWantedOutputs
--- no goal type needs it, or otherwise has a mutable objective --- and so I think this change is safe.depends on #13186
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.