Sedding prior to merge

This commit is contained in:
John Ericson 2023-12-04 08:56:06 -05:00
parent e172461e55
commit 622c25e3c4
2 changed files with 10 additions and 10 deletions

View file

@ -10,8 +10,8 @@
#include "serve-protocol.hh" #include "serve-protocol.hh"
#include "state.hh" #include "state.hh"
#include "util.hh" #include "util.hh"
#include "worker-protocol.hh" #include "serve-protocol.hh"
#include "worker-protocol-impl.hh" #include "serve-protocol-impl.hh"
#include "finally.hh" #include "finally.hh"
#include "url.hh" #include "url.hh"
@ -122,12 +122,12 @@ static void copyClosureTo(
the remote host to substitute missing paths. */ the remote host to substitute missing paths. */
// FIXME: substitute output pollutes our build log // FIXME: substitute output pollutes our build log
conn.to << ServeProto::Command::QueryValidPaths << 1 << useSubstitutes; conn.to << ServeProto::Command::QueryValidPaths << 1 << useSubstitutes;
WorkerProto::write(destStore, conn, closure); ServeProto::write(destStore, conn, closure);
conn.to.flush(); conn.to.flush();
/* Get back the set of paths that are already valid on the remote /* Get back the set of paths that are already valid on the remote
host. */ host. */
auto present = WorkerProto::Serialise<StorePathSet>::read(destStore, conn); auto present = ServeProto::Serialise<StorePathSet>::read(destStore, conn);
if (present.size() == closure.size()) return; if (present.size() == closure.size()) return;
@ -315,7 +315,7 @@ static BuildResult performBuild(
} }
} }
if (GET_PROTOCOL_MINOR(conn.remoteVersion) >= 6) { if (GET_PROTOCOL_MINOR(conn.remoteVersion) >= 6) {
WorkerProto::Serialise<DrvOutputs>::read(localStore, conn); ServeProto::Serialise<DrvOutputs>::read(localStore, conn);
} }
return result; return result;
@ -332,13 +332,13 @@ static std::map<StorePath, ValidPathInfo> queryPathInfos(
/* Get info about each output path. */ /* Get info about each output path. */
std::map<StorePath, ValidPathInfo> infos; std::map<StorePath, ValidPathInfo> infos;
conn.to << ServeProto::Command::QueryPathInfos; conn.to << ServeProto::Command::QueryPathInfos;
WorkerProto::write(localStore, conn, outputs); ServeProto::write(localStore, conn, outputs);
conn.to.flush(); conn.to.flush();
while (true) { while (true) {
auto storePathS = readString(conn.from); auto storePathS = readString(conn.from);
if (storePathS == "") break; if (storePathS == "") break;
auto deriver = readString(conn.from); // deriver auto deriver = readString(conn.from); // deriver
auto references = WorkerProto::Serialise<StorePathSet>::read(localStore, conn); auto references = ServeProto::Serialise<StorePathSet>::read(localStore, conn);
readLongLong(conn.from); // download size readLongLong(conn.from); // download size
auto narSize = readLongLong(conn.from); auto narSize = readLongLong(conn.from);
auto narHash = Hash::parseAny(readString(conn.from), htSHA256); auto narHash = Hash::parseAny(readString(conn.from), htSHA256);

View file

@ -21,7 +21,7 @@
#include "store-api.hh" #include "store-api.hh"
#include "sync.hh" #include "sync.hh"
#include "nar-extractor.hh" #include "nar-extractor.hh"
#include "worker-protocol.hh" #include "serve-protocol.hh"
typedef unsigned int BuildID; typedef unsigned int BuildID;
@ -310,12 +310,12 @@ struct Machine
// Backpointer to the machine // Backpointer to the machine
ptr machine; ptr machine;
operator nix::WorkerProto::ReadConn () operator nix::ServeProto::ReadConn ()
{ {
return { .from = from }; return { .from = from };
} }
operator nix::WorkerProto::WriteConn () operator nix::ServeProto::WriteConn ()
{ {
return { .to = to }; return { .to = to };
} }