From 06681c35a9191656b8f3a9a343e21457a71a947d Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 21 Aug 2020 02:07:17 +0100 Subject: refactor(tvix): Replace several DiscardLogsSink() with std::cerr Introduces the actual log sink in several places where we actually want the build logs to thread through correctly. This should cover *most* build paths. Change-Id: I735dff8a79f7e35a5874eb89b4abb980f9703dc2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1827 Reviewed-by: glittershark Tested-by: BuildkiteCI --- third_party/nix/src/nix-env/user-env.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'third_party/nix/src/nix-env/user-env.cc') diff --git a/third_party/nix/src/nix-env/user-env.cc b/third_party/nix/src/nix-env/user-env.cc index e3124a60e385..bce5c44f9591 100644 --- a/third_party/nix/src/nix-env/user-env.cc +++ b/third_party/nix/src/nix-env/user-env.cc @@ -1,5 +1,7 @@ #include "nix-env/user-env.hh" +#include + #include #include "libexpr/eval-inline.hh" @@ -38,9 +40,8 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile, } DLOG(INFO) << "building user environment dependencies"; - auto discard_logs = DiscardLogsSink(); util::OkOrThrow(state.store->buildPaths( - discard_logs, drvsToBuild, state.repair != 0u ? bmRepair : bmNormal)); + std::cerr, drvsToBuild, state.repair != 0u ? bmRepair : bmNormal)); /* Construct the whole top level derivation. */ PathSet references; @@ -140,7 +141,7 @@ bool createUserEnv(EvalState& state, DrvInfos& elems, const Path& profile, /* Realise the resulting store expression. */ DLOG(INFO) << "building user environment"; util::OkOrThrow(state.store->buildPaths( - discard_logs, {topLevelDrv}, state.repair != 0u ? bmRepair : bmNormal)); + std::cerr, {topLevelDrv}, state.repair != 0u ? bmRepair : bmNormal)); /* Switch the current user environment to the output path. */ auto store2 = state.store.dynamic_pointer_cast(); -- cgit 1.4.1