fix(tvix): Add newlines to build logs
.. turns out producing an entire build log on a single line is not useful. This does not use `<< std::endl` because we have run into buffering issues with the implementation of the logs->gRPC sink, but intend to replace this in the future using a structured sink for BuildEvent protos rather than a raw stream. Change-Id: Ia9b05fa804391d389e2ef53ab4436c0ec5cc452e Reviewed-on: https://cl.tvl.fyi/c/depot/+/1828 Reviewed-by: glittershark <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
06681c35a9
commit
ec72ca1961
1 changed files with 2 additions and 2 deletions
4
third_party/nix/src/libstore/build.cc
vendored
4
third_party/nix/src/libstore/build.cc
vendored
|
@ -1473,7 +1473,7 @@ void DerivationGoal::tryToBuild() {
|
|||
if (hook) {
|
||||
msg += fmt(" on '%s'", machineName);
|
||||
}
|
||||
log_sink_ << msg << "[" << drvPath << "]";
|
||||
log_sink_ << absl::StrCat(msg, "[", drvPath, "]\n");
|
||||
mcRunningBuilds =
|
||||
std::make_unique<MaintainCount<uint64_t>>(worker.runningBuilds);
|
||||
};
|
||||
|
@ -3835,7 +3835,7 @@ void DerivationGoal::handleEOF(int /* fd */) {
|
|||
void DerivationGoal::flushLine() {
|
||||
if (settings.verboseBuild &&
|
||||
(settings.printRepeatedBuilds || curRound == 1)) {
|
||||
log_sink_ << currentLogLine;
|
||||
log_sink_ << absl::StrCat(currentLogLine, "\n");
|
||||
} else {
|
||||
logTail.push_back(currentLogLine);
|
||||
if (logTail.size() > settings.logLines) {
|
||||
|
|
Loading…
Reference in a new issue