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 <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
262af89f81
commit
06681c35a9
7 changed files with 15 additions and 24 deletions
7
third_party/nix/src/libexpr/primops.cc
vendored
7
third_party/nix/src/libexpr/primops.cc
vendored
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <regex>
|
||||
|
||||
#include <absl/strings/str_split.h>
|
||||
|
|
@ -92,11 +93,7 @@ void EvalState::realiseContext(const PathSet& context) {
|
|||
store->queryMissing(drvs, willBuild, willSubstitute, unknown, downloadSize,
|
||||
narSize);
|
||||
|
||||
// TODO(tazjin): Figure out where these logs are supposed to go ...
|
||||
// unless we keep a per-store stream open persistently there's no
|
||||
// "generic" way to send logs anywhere for cases like this (IFD).
|
||||
auto discard_logs = DiscardLogsSink();
|
||||
nix::util::OkOrThrow(store->buildPaths(discard_logs, drvs));
|
||||
nix::util::OkOrThrow(store->buildPaths(std::cerr, drvs));
|
||||
}
|
||||
|
||||
/* Load and evaluate an expression from path specified by the
|
||||
|
|
|
|||
2
third_party/nix/src/libexpr/primops.hh
vendored
2
third_party/nix/src/libexpr/primops.hh
vendored
|
|
@ -6,7 +6,7 @@
|
|||
namespace nix {
|
||||
|
||||
struct RegisterPrimOp {
|
||||
typedef std::vector<std::tuple<std::string, size_t, PrimOpFun>> PrimOps;
|
||||
using PrimOps = std::vector<std::tuple<std::string, size_t, PrimOpFun> >;
|
||||
static PrimOps* primOps;
|
||||
/* You can register a constant by passing an arity of 0. fun
|
||||
will get called during EvalState initialization, so there
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue