You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
with get shells out to host curl/wget — must be runtime-native fetch #623
with get (build-graph fetch) invokes HOST curl (src/BuildGraphTools.w:41 defines the curl tool; ComptimeEval.w:1681 whitelists curl/wget/https_fetch). The compiler's own tooling depending on a host binary is the same violation class as the removed cc -E shell-out (#348): breaks on clean hosts, violates the no-external-commands invariant (AGENTS.md), and contradicts §16.1/§18 self-containedness. (The ComptimeEval tool whitelist is fine for USER build.w scripts — the violation is with get, compiler tooling, using it for its own operation.)
WWED
Fetch must be runtime-native: HTTPS through With runtime syscalls (pure-With TLS is a big lift, so staged: (a) short-term, a vendored/runtime https_fetch implemented in With over the socket runtime + platform TLS via extern fn bindings to Security.framework/openssl-the-system-lib is still a library BINDING, not a subprocess — bindings are the sanctioned mechanism, subprocesses are not; (b) document the boundary). Zero non-With code invariant applies to any implementation.
Found
2026-07-03 while explaining a 28-minute gate run: live curl inside cli-selfhost-project-tests.
Correction from Eric + verification — this is simpler and worse than filed: With already has its own fetch stack (lib/std/http.w — HTTP/1.1 over std.tls; the build system even compiles a native https_fetch tool from build/https_fetch.w via lib/std/build.w:2007). So the curl/wget path in BuildGraphTools isn't a missing-capability workaround — it's a redundant host-tool dependency sitting NEXT to the native implementation. WWED revision: with get uses the native fetch unconditionally; DELETE the curl/wget tool definitions and the ComptimeEval whitelist entries for the compiler's own operations (no fallback — a second engine that can disagree, per the #348 precedent). Observed on this host: live curl ran during the gate suite, so the host-tool path is the one actually taken.
Exact mechanism found (answers 'why curl'):src/compiler/ConanClient.w:33-60 — the with get c.* client has a private conan_curl_to_file building a host-curl argv via runtime_exec_argv_capture, plus conan_extract_tgz* shelling out to host tar. It's a THIRD fetch path that predates the native stack and never migrated: lib/std/http.w (HTTP/1.1 over std.tls) exists, and build.w's download action already compiles-and-runs the native https_fetch helper (lib/std/build.w:2062+) — ConanClient just doesn't use either. Drift, not design.
WWED (revised fix plan): port ConanClient to the native stack — fetch via std.http (or the same https_fetch helper build.w uses), gzip via lib/std/zlib.w (already in the stdlib), plus a small tar reader in With (ustar parsing is ~100 lines); DELETE conan_curl_to_file, the tar argv helpers, and the now-unused build_graph_curl_tool/whitelist entries. No fallback — one engine (the #348 rule).
Full path mapped; reverted the in-progress attempt to keep the tree clean. The correct fix is bootstrap-phased — this is why it can't land in one cycle.
WWED confirmed by Eric: use std.zlib, not a second inflater. An implementation attempt (native std.http fetch + a compiler-private buffer-based tar reader + std.zlib for gzip) works end-to-end — verified downloading and extracting a real zlib/1.3.1 package from center2.conan.io byte-identically to host tar — BUT hits a hard bootstrap-ordering wall:
Renaming zlib's internal code→zhuff (698 type-position replacements across the 6 zlib files) clears the collision — BUT the release binary EMBEDS the stdlib, and each build STAGE compiles compiler code against the CURRENT stage's embedded stdlib. So a with build that adds use std.zlib to Tar.w still sees the OLD embedded code and fails. Classic runtime-migration bootstrap: the stdlib rename (or Imported type name shadows a same-named local in value/receiver position (should be a value-namespace lookup) #628) must ship in a SEED first; only then can compiler code use std.zlib. (CLAUDE.md 'Bootstrap order for runtime migration'.)
Option B: Phase-1 commit renames zlib code→zhuff (stdlib-only) + bootstrap seed; Phase-2 commit adds use std.zlib to a new src/compiler/Tar.w + rewires ConanClient off curl/tar.
The tar layer (buffer-based ustar+pax+GNU-longname reader, verified against real Conan pax archives) is salvageable either way — it needs no rename.
Residuals for this issue's scope: conan_compile_c_source still shells to $CC (needs a C compiler for source-fallback builds — separate question); std.http has no connect/read timeouts (a hung server hangs with get).
post-release: the native fetch is bootstrap-phased (the last comment maps it: std.http over std.zlib, landing across a seed cut); every supported host ships curl today.
Activity
ehartford commentedon Jul 3, 2026
Correction from Eric + verification — this is simpler and worse than filed: With already has its own fetch stack (
lib/std/http.w— HTTP/1.1 overstd.tls; the build system even compiles a nativehttps_fetchtool frombuild/https_fetch.wvialib/std/build.w:2007). So the curl/wget path in BuildGraphTools isn't a missing-capability workaround — it's a redundant host-tool dependency sitting NEXT to the native implementation. WWED revision:with getuses the native fetch unconditionally; DELETE the curl/wget tool definitions and the ComptimeEval whitelist entries for the compiler's own operations (no fallback — a second engine that can disagree, per the #348 precedent). Observed on this host: live curl ran during the gate suite, so the host-tool path is the one actually taken.ehartford commentedon Jul 3, 2026
Exact mechanism found (answers 'why curl'):
src/compiler/ConanClient.w:33-60— thewith get c.*client has a privateconan_curl_to_filebuilding a host-curl argv viaruntime_exec_argv_capture, plusconan_extract_tgz*shelling out to hosttar. It's a THIRD fetch path that predates the native stack and never migrated:lib/std/http.w(HTTP/1.1 over std.tls) exists, and build.w's download action already compiles-and-runs the nativehttps_fetchhelper (lib/std/build.w:2062+) — ConanClient just doesn't use either. Drift, not design.WWED (revised fix plan): port ConanClient to the native stack — fetch via std.http (or the same https_fetch helper build.w uses), gzip via
lib/std/zlib.w(already in the stdlib), plus a small tar reader in With (ustar parsing is ~100 lines); DELETEconan_curl_to_file, the tar argv helpers, and the now-unusedbuild_graph_curl_tool/whitelist entries. No fallback — one engine (the #348 rule).ehartford commentedon Jul 3, 2026
Full path mapped; reverted the in-progress attempt to keep the tree clean. The correct fix is bootstrap-phased — this is why it can't land in one cycle.
WWED confirmed by Eric: use std.zlib, not a second inflater. An implementation attempt (native std.http fetch + a compiler-private buffer-based tar reader + std.zlib for gzip) works end-to-end — verified downloading and extracting a real
zlib/1.3.1package from center2.conan.io byte-identically to host tar — BUT hits a hard bootstrap-ordering wall:use std.zlibcannot enter compiler code today becauselib/std/zlib/defs.wexportspub type code(an internal Huffman-table struct) which, when imported, shadows same-named locals in value position — includingsrc/main.w:518code.len(). (That shadowing is itself a general bug — filed Imported type name shadows a same-named local in value/receiver position (should be a value-namespace lookup) #628; fixing it removes the need for any rename.)code→zhuff(698 type-position replacements across the 6 zlib files) clears the collision — BUT the release binary EMBEDS the stdlib, and each build STAGE compiles compiler code against the CURRENT stage's embedded stdlib. So awith buildthat addsuse std.zlibto Tar.w still sees the OLD embeddedcodeand fails. Classic runtime-migration bootstrap: the stdlib rename (or Imported type name shadows a same-named local in value/receiver position (should be a value-namespace lookup) #628) must ship in a SEED first; only then can compiler codeuse std.zlib. (CLAUDE.md 'Bootstrap order for runtime migration'.)Recommended sequencing for a focused session:
use std.zlibdirectly, no rename.code→zhuff(stdlib-only) + bootstrap seed; Phase-2 commit addsuse std.zlibto a newsrc/compiler/Tar.w+ rewires ConanClient off curl/tar.Residuals for this issue's scope:
conan_compile_c_sourcestill shells to$CC(needs a C compiler for source-fallback builds — separate question); std.http has no connect/read timeouts (a hung server hangswith get).Fix #629: an else-if arm no longer swallows the outer chain's else
test: skip the flaky get-zlib network case (unconditional)
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): still reproduces. The fetch tool is host curl:post-release: the native fetch is bootstrap-phased (the last comment maps it: std.http over std.zlib, landing across a seed cut); every supported host ships curl today.