Skip to content

Commit 71f268c

Browse files
zahclaude
andcommitted
repro_cli_support: forward reprobuild env vars to user daemon
The CLI snapshots the user's shell environment in ``daemonCarriedEnvironment()`` and ships it across the daemon protocol so the daemon-hosted build subprocesses inherit the user's toolchain configuration. The allowlist was missing the reprobuild-specific env vars that ``config.nims`` and the interface-extraction nim subprocesses read: - REPROBUILD_USE_SYSTEM_HASH_LIBS: when "1", config.nims uses system libblake3 / libxxhash (-I/-L/-lblake3 / -lxxhash). Without it, config.nims defaults to vendored mode and ``--define:reproVendoredHash``, which makes ``libs/blake3/src/blake3.nim`` try to ``.compile:`` from ``references/mold/third-party/blake3/c/`` — the references directory is gitignored, so CI checkouts fail at the very first nim subprocess the daemon spawns ("daemon-hosted build failed: ... cannot find: ../../../references/mold/third-party/blake3/c/blake3.c"). - BLAKE3_PREFIX / XXHASH_PREFIX / SQLITE_PREFIX: prefix paths that config.nims and ``externalHashFlags`` read to discover the system libs. - NIMCRYPTO_SRC / RUNQUOTA_SRC / BEARSSL_SRC: source-only dependency inputs config.nims registers as ``addPackagePath`` lookups so ``import nimcrypto`` etc. work without nimble. This unblocks ``repro build test`` in CI under the daemon-hosted path. Local development was unaffected because ``nix develop --command`` sets the env vars on the CLI shell, the CLI passes them to a fresh daemon that inherits them via fork. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent aa46e1a commit 71f268c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

libs/repro_cli_support/src/repro_cli_support.nim

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7720,7 +7720,14 @@ const
77207720
"REPROBUILD_ACTION_CACHE_ROOT", "REPROBUILD_MAX_PARALLELISM",
77217721
"REPRO_STATS_DIR", "REPROBUILD_NO_RUNQUOTA",
77227722
"REPROBUILD_AUTO_RUNQUOTA",
7723-
"REPRO_DAEMON_TEST_STATS_FLUSH_DELAY_MS"
7723+
"REPRO_DAEMON_TEST_STATS_FLUSH_DELAY_MS",
7724+
# Reprobuild's own build-time env vars consumed by config.nims and the
7725+
# interface-extraction nim subprocesses. Without these, config.nims
7726+
# defaults to vendored-hash mode and tries to compile from
7727+
# references/mold/, which is gitignored and so missing in CI checkouts.
7728+
"REPROBUILD_USE_SYSTEM_HASH_LIBS",
7729+
"BLAKE3_PREFIX", "XXHASH_PREFIX", "SQLITE_PREFIX",
7730+
"NIMCRYPTO_SRC", "RUNQUOTA_SRC", "BEARSSL_SRC"
77247731
]
77257732

77267733
## Well-known toolchain env vars that must also be forwarded to the daemon

0 commit comments

Comments
 (0)