Skip to content

Commit 7707d0a

Browse files
committed
Get rid of filterDrvOutputs
We don't need it any more, because we only used it in the single-wanted-output `DerivationGoal`.
1 parent 766a52c commit 7707d0a

File tree

3 files changed

+2
-22
lines changed

3 files changed

+2
-22
lines changed

src/libstore/build/derivation-goal.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,8 @@ Goal::Done DerivationGoal::done(BuildResult::Status status, SingleDrvOutputs bui
359359
mcExpectedBuilds.reset();
360360

361361
if (buildResult.success()) {
362-
auto wantedBuiltOutputs = filterDrvOutputs(OutputsSpec::Names{wantedOutput}, std::move(builtOutputs));
363-
assert(!wantedBuiltOutputs.empty());
364-
buildResult.builtOutputs = std::move(wantedBuiltOutputs);
362+
assert(!builtOutputs.empty());
363+
buildResult.builtOutputs = std::move(builtOutputs);
365364
if (status == BuildResult::Built)
366365
worker.doneBuilds++;
367366
} else {

src/libstore/include/nix/store/realisation.hh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,6 @@ typedef std::map<OutputName, Realisation> SingleDrvOutputs;
102102
*/
103103
typedef std::map<DrvOutput, Realisation> DrvOutputs;
104104

105-
/**
106-
* Filter a SingleDrvOutputs to include only specific output names
107-
*
108-
* Moves the `outputs` input.
109-
*/
110-
SingleDrvOutputs filterDrvOutputs(const OutputsSpec &, SingleDrvOutputs &&);
111-
112105
struct OpaquePath
113106
{
114107
StorePath path;

src/libstore/realisation.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -135,18 +135,6 @@ size_t Realisation::checkSignatures(const PublicKeys & publicKeys) const
135135
return good;
136136
}
137137

138-
SingleDrvOutputs filterDrvOutputs(const OutputsSpec & wanted, SingleDrvOutputs && outputs)
139-
{
140-
SingleDrvOutputs ret = std::move(outputs);
141-
for (auto it = ret.begin(); it != ret.end();) {
142-
if (!wanted.contains(it->first))
143-
it = ret.erase(it);
144-
else
145-
++it;
146-
}
147-
return ret;
148-
}
149-
150138
StorePath RealisedPath::path() const
151139
{
152140
return std::visit([](auto && arg) { return arg.getPath(); }, raw);

0 commit comments

Comments
 (0)