4.5 KiB
G-099 suite_tcl86: zig buildsuite for core-8-6-branch (runtime, thread, tclvfs, core-test gate)
Status: proposed Scope: src/buildsuites/suite_tcl86/ (new: suite.tcl driver, 8.6 zig recipe + helper modules, expected_test_failures baseline), src/buildsuites/_build/ (untracked sources/outputs via existing globs), bin/tools/ (pinned zig as consumed), PUNK_FOSSIL_STORE / ~/.punkshell/fossils (hermetic clone store shared with suite_tcl90) Goal: a tracked suite_tcl86 buildsuite builds a Tcl 8.6 windows runtime from fossil core-8-6-branch sources using the pinned zig toolchain only (zig-only build policy; msys/mingw and MS toolchains remain test/validation-only), together with the core binary companions punkshell's Tcl 8 targets need - an 8.6-compatible thread branch and tclvfs - and gates the result against the 8.6 core testsuite via parsed all.tcl totals against a tracked, dispositioned expected-failure baseline, mirroring the suite_tcl90 gate mechanism. Acceptance: from the pinned zig and fetched core-8-6-branch sources (hermetic clone store, no MS toolchain) the suite produces a working tclsh86 executable and tcl86 dll with an installed lib tree the shell resolves without external Tcl installations (TCLLIBPATH/TCL_LIBRARY unset in all suite child invocations); an 8.6-compatible thread package and tclvfs build and load in that shell (versions recorded); suite.tcl test runs the 8.6 core testsuite, parses totals (exit codes not trusted), and gates against a tracked expected_test_failures baseline with every entry dispositioned with a reason - a full-run PASS deterministic across two consecutive runs is recorded in this file; an interactive-smoke record (script execution, package require checks) is captured here.
Context
Follow-on arc to G-096/G-098 (suite_tcl90, achieved 2026-07-20), per user direction 2026-07-20: "we need a similar set of goals around building for core-8-6-branch".
8.6 remains punkshell's real Tcl 8 target (punk86-class kits; 8.7 is unreleased dev convenience only). Today the 8.6 kits ride on prebuilt third-party runtimes (tclkit86bi.exe, tclkit-win64-dyn.exe) - a provenance and rebuildability gap this arc ultimately closes.
Known differences from suite_tcl90 to expect (assessments to verify at activation):
- NO zipfs in 8.6: no szip-style self-contained runtime is possible. This suite delivers exe + dll + on-disk lib tree only. Kit containment (metakit/cookfs/zipvfs candidates) is deliberately OUT of scope - see G-101.
- thread: trunk (3.x) targets Tcl 9; 8.6 pairs with the thread 2.8 branch - exact branch/tag selection to verify and pin.
- Source-tree/build differences vs the 9.0.5 recipe: 8.6's bundled zlib/libtommath arrangements differ; no tclUuid.h; manifest/rc generation to re-derive from 8.6's win/makefile.vc; TCL_BROKEN_MAINARGS-era entry-point handling differs from the mingw-unicode-entry work done for 9.0.5. Helper modules (build_zlib, build_libtommath, wrapfiletofile) reusable where the trees align - assess rather than assume.
- Test gate: a separate 8.6 expected_test_failures baseline (failure census unknown until the first full run; the 9.0.5 census does not transfer). Machine traits already dispositioned for 9.0.5 (OS username vs profile dir, admin shares) will likely reappear under their 8.6 test names.
- 8.6 has no tcl::process: runtests -jobs child handling falls back to blocking execs (documented convoy behaviour) - the core-test gate runs via suite.tcl, not runtests, so this only affects later punkshell-suite work (G-100).
- Shared scaffolding: fossil_source/clone-store/env-hygiene conventions exist in suite_tcl90/suite.tcl. Factor shared parts out only when this second consumer makes the right shape obvious - avoid premature generalization; duplication with a note is acceptable at first.
SEQUENCING (2026-07-20 discussion): drafted as proposed while suite_tcl90 matures - recommendation is to complete G-096's remaining items (TCLSH_PIPEREPL patch rebase + behaviour matrix, punk-getzig per-version fetch) and run the punk905_beta interactive trial through to promotion before activating this goal, so the shared suite scaffolding settles before it is forked. Also weigh G-102 (zig-driver hybrid bootstrap, achieved 2026-07-21 - the driver shape is now SETTLED: pipeline as zig recipe steps, zon-pinned + fossil-checkout source flows converging on one staged invocation): its natural slot was before or alongside this goal so suite_tcl86 is born onto the chosen driver shape rather than ported later.
Notes
(none yet)