mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-29 12:35:15 +02:00
daemon: Support multiplexed build output.
This allows clients to tell whether output comes from the daemon or, if
it comes from a builder, from which builder it comes. The latter is
particularly useful when MAX-BUILD-JOBS > 1.
* nix/libstore/build.cc (DerivationGoal::tryBuildHook)
(DerivationGoal::startBuilder): Print the child's PID in "@ build-started"
traces.
(DerivationGoal::handleChildOutput): Define 'prefix', pass it to
'writeToStderr'.
* nix/libstore/globals.cc (Settings:Settings): Initialize
'multiplexedBuildOutput'.
(Settings::update): Likewise.
* nix/libstore/globals.hh (Settings)[multiplexedBuildOutput]: New field.
Update 'printBuildTrace' documentation.
* nix/libstore/worker-protocol.hh (PROTOCOL_VERSION): Bump to 0.163.
* nix/nix-daemon/nix-daemon.cc (performOp) <wopSetOptions>: Special-case
"multiplexed-build-output" and remove "use-ssh-substituter".
* guix/store.scm (set-build-options): Add #:multiplexed-build-output?
and honor it.
(%protocol-version): Bump to #x163.
* tests/store.scm ("multiplexed-build-output"): New test.
fixlet
This commit is contained in:
@@ -127,7 +127,7 @@ struct Settings {
|
||||
a fixed format to allow its progress to be monitored. Each
|
||||
line starts with a "@". The following are defined:
|
||||
|
||||
@ build-started <drvpath> <outpath> <system> <logfile>
|
||||
@ build-started <drvpath> <outpath> <system> <logfile> <pid>
|
||||
@ build-failed <drvpath> <outpath> <exitcode> <error text>
|
||||
@ build-succeeded <drvpath> <outpath>
|
||||
@ substituter-started <outpath> <substituter>
|
||||
@@ -139,6 +139,13 @@ struct Settings {
|
||||
builders. */
|
||||
bool printBuildTrace;
|
||||
|
||||
/* When true, 'buildDerivations' prefixes lines coming from builders so
|
||||
that clients know exactly which line comes from which builder, and
|
||||
which line comes from the daemon itself. The prefix for data coming
|
||||
from builders is "log:PID:LEN:DATA" where PID uniquely identifies the
|
||||
builder (PID is given in "build-started" traces.) */
|
||||
bool multiplexedBuildOutput;
|
||||
|
||||
/* Amount of reserved space for the garbage collector
|
||||
(/nix/var/nix/db/reserved). */
|
||||
off_t reservedSize;
|
||||
|
||||
Reference in New Issue
Block a user