From 33e8b0f975cd8934405c568cfa1d7e2a1edfa425 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Thu, 20 Aug 2020 03:28:35 +0100 Subject: chore(tvix): Thread a std::ostream through Store::buildPaths This part of the store API needs to carry a handle to the log sink from now on, so that it can be passed in as appropriate from the gRPC handlers. In all places where there is no such handler available at the moment, the discarding log sink has been inserted. This can be used as a convenient grep target in the future. Change-Id: I26628e30b4c6437dccdf8f722ca2e8ed827dfc19 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1797 Tested-by: BuildkiteCI Reviewed-by: kanepyork Reviewed-by: glittershark --- third_party/nix/src/libstore/remote-store.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'third_party/nix/src/libstore/remote-store.cc') diff --git a/third_party/nix/src/libstore/remote-store.cc b/third_party/nix/src/libstore/remote-store.cc index 6948d4e61d0e..e99c442c3d67 100644 --- a/third_party/nix/src/libstore/remote-store.cc +++ b/third_party/nix/src/libstore/remote-store.cc @@ -460,18 +460,19 @@ Path RemoteStore::addTextToStore(const std::string& name, const std::string& s, return readStorePath(*this, conn->from); } -absl::Status RemoteStore::buildPaths(const PathSet& drvPaths, - BuildMode buildMode) { +absl::Status RemoteStore::buildPaths(std::ostream& /* log_sink */, + const PathSet& drvPaths, + BuildMode build_mode) { auto conn(getConnection()); conn->to << wopBuildPaths; if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 13) { conn->to << drvPaths; if (GET_PROTOCOL_MINOR(conn->daemonVersion) >= 15) { - conn->to << buildMode; + conn->to << build_mode; } else /* Old daemons did not take a 'buildMode' parameter, so we need to validate it here on the client side. */ - if (buildMode != bmNormal) { + if (build_mode != bmNormal) { return absl::Status( absl::StatusCode::kInvalidArgument, "repairing or checking is not supported when building through the " -- cgit 1.4.1