Describe the bug
Since DerivationBuildingGoal was split out (3b617e4), checking is broken because of an DerivationBuildingGoal::assertPathValidity call at
|
return miscMethods->assertPathValidity(); |
The issue is that DerivationBuildingGoal doesn't know what outputs are wanted any more. This was intentional --- when we are building rather than substituting, we know we are going to produce all outputs. However this assertPathValidity was happening before the build, and was intended to check that the outputs we want to repair are all there.
Steps To Reproduce
- Substitute some but not all outputs of a derivation.
- Repair that derivation
- Get an error message about missing unexpected invalid outputs, not because the outputs we have are broken, but because the outputs that we don't have, and don't care about not having.
Expected behavior
It should be fine to only repair some outputs, just like before
Metadata
Bisected to 3b617e4
Additional context
I would like to not solve this issue by reintroducing wantedOutputs to DerivationBuildingGoal. Can we instead solve this problem a different way?
Possible solutions:
- Elide the check: if we got this far, at least some of the outputs should be valid, right?
- Skip the early return: We did a build, so we have all the outputs now, we might as well register them in case we were missing some before
- Just do the earlier return, but then in
DerivationGoal after we return do the check. Then we're back to knowing what output we want.
Checklist
Add 👍 to issues you find important.
CC @xokdvium
Describe the bug
Since
DerivationBuildingGoalwas split out (3b617e4), checking is broken because of anDerivationBuildingGoal::assertPathValiditycall atnix/src/libstore/unix/build/derivation-builder.cc
Line 2854 in 3b617e4
The issue is that
DerivationBuildingGoaldoesn't know what outputs are wanted any more. This was intentional --- when we are building rather than substituting, we know we are going to produce all outputs. However thisassertPathValiditywas happening before the build, and was intended to check that the outputs we want to repair are all there.Steps To Reproduce
Expected behavior
It should be fine to only repair some outputs, just like before
Metadata
Bisected to 3b617e4
Additional context
I would like to not solve this issue by reintroducing
wantedOutputstoDerivationBuildingGoal. Can we instead solve this problem a different way?Possible solutions:
DerivationGoalafter we return do the check. Then we're back to knowing what output we want.Checklist
Add 👍 to issues you find important.
CC @xokdvium