1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-06 09:01:01 +01:00

Split OutputsSpec::merge into OuputsSpec::{union_, isSubsetOf}

Additionally get rid of the evil time we made an empty
`OutputSpec::Names()`.
This commit is contained in:
John Ericson 2023-01-12 20:20:27 -05:00
parent 0faf5326bd
commit 31875bcfb7
4 changed files with 56 additions and 30 deletions

View file

@ -144,9 +144,10 @@ void DerivationGoal::work()
void DerivationGoal::addWantedOutputs(const OutputsSpec & outputs)
{
bool newOutputs = wantedOutputs.merge(outputs);
if (newOutputs)
auto newWanted = wantedOutputs.union_(outputs);
if (!newWanted.isSubsetOf(wantedOutputs))
needRestart = true;
wantedOutputs = newWanted;
}