aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/build
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2023-04-17 13:40:46 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2023-06-19 12:08:23 -0400
commit9f69b7dee9fc6035b8aa0cc718f5e74af460d9aa (patch)
tree167c44235e63dd0ed73b7ee3497ee04ecccfda86 /src/libstore/build
parent4e8b495ad7dddabc35bf9d6afe3573426ffed15d (diff)
Create `worker_proto::{Read,Write}Conn`
Pass this around instead of `Source &` and `Sink &` directly. This will give us something to put the protocol version on once the time comes. To do this ergonomically, we need to expose `RemoteStore::Connection`, so do that too. Give it some more API docs while we are at it.
Diffstat (limited to 'src/libstore/build')
-rw-r--r--src/libstore/build/derivation-goal.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/build/derivation-goal.cc b/src/libstore/build/derivation-goal.cc
index 1a946e3d2..5e37f7ecb 100644
--- a/src/libstore/build/derivation-goal.cc
+++ b/src/libstore/build/derivation-goal.cc
@@ -1151,9 +1151,11 @@ HookReply DerivationGoal::tryBuildHook()
throw;
}
+ WorkerProto::WriteConn conn { hook->sink };
+
/* Tell the hook all the inputs that have to be copied to the
remote system. */
- WorkerProto::write(worker.store, hook->sink, inputPaths);
+ WorkerProto::write(worker.store, conn, inputPaths);
/* Tell the hooks the missing outputs that have to be copied back
from the remote system. */
@@ -1164,7 +1166,7 @@ HookReply DerivationGoal::tryBuildHook()
if (buildMode != bmCheck && status.known && status.known->isValid()) continue;
missingOutputs.insert(outputName);
}
- WorkerProto::write(worker.store, hook->sink, missingOutputs);
+ WorkerProto::write(worker.store, conn, missingOutputs);
}
hook->sink = FdSink();