@@ -658,30 +658,6 @@ void RemoteStore::queryRealisationUncached(const DrvOutput & id,
658658 } catch (...) { return callback.rethrow (); }
659659}
660660
661- static void writeDerivedPaths (RemoteStore & store, RemoteStore::Connection & conn, const std::vector<DerivedPath> & reqs)
662- {
663- if (GET_PROTOCOL_MINOR (conn.daemonVersion ) >= 30 ) {
664- WorkerProto::write (store, conn, reqs);
665- } else {
666- Strings ss;
667- for (auto & p : reqs) {
668- auto sOrDrvPath = StorePathWithOutputs::tryFromDerivedPath (p);
669- std::visit (overloaded {
670- [&](const StorePathWithOutputs & s) {
671- ss.push_back (s.to_string (store));
672- },
673- [&](const StorePath & drvPath) {
674- throw Error (" trying to request '%s', but daemon protocol %d.%d is too old (< 1.29) to request a derivation file" ,
675- store.printStorePath (drvPath),
676- GET_PROTOCOL_MAJOR (conn.daemonVersion ),
677- GET_PROTOCOL_MINOR (conn.daemonVersion ));
678- },
679- }, sOrDrvPath );
680- }
681- conn.to << ss;
682- }
683- }
684-
685661void RemoteStore::copyDrvsFromEvalStore (
686662 const std::vector<DerivedPath> & paths,
687663 std::shared_ptr<Store> evalStore)
@@ -704,7 +680,7 @@ void RemoteStore::buildPaths(const std::vector<DerivedPath> & drvPaths, BuildMod
704680 auto conn (getConnection ());
705681 conn->to << WorkerProto::Op::BuildPaths;
706682 assert (GET_PROTOCOL_MINOR (conn->daemonVersion ) >= 13 );
707- writeDerivedPaths (*this , *conn, drvPaths);
683+ WorkerProto::write (*this , *conn, drvPaths);
708684 if (GET_PROTOCOL_MINOR (conn->daemonVersion ) >= 15 )
709685 conn->to << buildMode;
710686 else
@@ -728,7 +704,7 @@ std::vector<KeyedBuildResult> RemoteStore::buildPathsWithResults(
728704
729705 if (GET_PROTOCOL_MINOR (conn->daemonVersion ) >= 34 ) {
730706 conn->to << WorkerProto::Op::BuildPathsWithResults;
731- writeDerivedPaths (*this , *conn, paths);
707+ WorkerProto::write (*this , *conn, paths);
732708 conn->to << buildMode;
733709 conn.processStderr ();
734710 return WorkerProto::Serialise<std::vector<KeyedBuildResult>>::read (*this , *conn);
@@ -917,7 +893,7 @@ void RemoteStore::queryMissing(const std::vector<DerivedPath> & targets,
917893 // to prevent a deadlock.
918894 goto fallback;
919895 conn->to << WorkerProto::Op::QueryMissing;
920- writeDerivedPaths (*this , *conn, targets);
896+ WorkerProto::write (*this , *conn, targets);
921897 conn.processStderr ();
922898 willBuild = WorkerProto::Serialise<StorePathSet>::read (*this , *conn);
923899 willSubstitute = WorkerProto::Serialise<StorePathSet>::read (*this , *conn);
0 commit comments