diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2023-04-17 18:08:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-17 18:08:05 +0200 |
commit | 3f9589f17e9e03aeb45b70f436c25227c728ba51 (patch) | |
tree | 347724e73ffcc1f437ee2665434d097ed1b5ea0c /src/libstore/legacy-ssh-store.cc | |
parent | 39e0f609cce54276ebfd9ac647364b49c73120b0 (diff) | |
parent | 24866b71c40f0fcb5a601d90d4f87366fe626090 (diff) |
Merge pull request #6312 from obsidiansystems/keyed-build-result
Shuffle `BuildResult` data definition, make state machine clearer, introduce `SingleDrvOutputs`
Diffstat (limited to 'src/libstore/legacy-ssh-store.cc')
-rw-r--r-- | src/libstore/legacy-ssh-store.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/libstore/legacy-ssh-store.cc b/src/libstore/legacy-ssh-store.cc index c3cb3032a..2012584e0 100644 --- a/src/libstore/legacy-ssh-store.cc +++ b/src/libstore/legacy-ssh-store.cc @@ -287,19 +287,18 @@ public: conn->to.flush(); - BuildResult status { - .path = DerivedPath::Built { - .drvPath = drvPath, - .outputs = OutputsSpec::All { }, - }, - }; + BuildResult status; status.status = (BuildResult::Status) readInt(conn->from); conn->from >> status.errorMsg; if (GET_PROTOCOL_MINOR(conn->remoteVersion) >= 3) conn->from >> status.timesBuilt >> status.isNonDeterministic >> status.startTime >> status.stopTime; if (GET_PROTOCOL_MINOR(conn->remoteVersion) >= 6) { - status.builtOutputs = worker_proto::read(*this, conn->from, Phantom<DrvOutputs> {}); + auto builtOutputs = worker_proto::read(*this, conn->from, Phantom<DrvOutputs> {}); + for (auto && [output, realisation] : builtOutputs) + status.builtOutputs.insert_or_assign( + std::move(output.outputName), + std::move(realisation)); } return status; } @@ -330,7 +329,7 @@ public: conn->to.flush(); - BuildResult result { .path = DerivedPath::Opaque { StorePath::dummy } }; + BuildResult result; result.status = (BuildResult::Status) readInt(conn->from); if (!result.success()) { |