This repository was archived by the owner on Jul 21, 2026. It is now read-only.
tcl: preserve the threaded language runtime - #41
Open
brandonpayton wants to merge 2 commits into
Open
Conversation
brandonpayton
force-pushed
the
migrate/tcl-language
branch
from
July 11, 2026 23:35
3a91ed0 to
0ee8c6b
Compare
brandonpayton
force-pushed
the
migrate/tcl-language
branch
from
July 13, 2026 01:17
0ee8c6b to
632760b
Compare
Member
Author
|
Independent exact-head re-review completed for
No Formula blocker remains. A clean source build/test and dependency-first final-ABI pours are still required before merge/publication. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Kandelo users and downstream packages need the current Tcl 9 runtime from
Homebrew. The available package still comes from the older registry, and a
partial port could quietly fall back to Tcl 8.6 behavior or disable threads,
dynamic extensions, and child commands. Migrating the complete runtime matters
because those features exercise the real Kandelo threading, loader, filesystem,
and process contracts that Tcl applications depend on.
What changed
<sys/queue.h>.loadand pthread support; replace Tcl's native-only pthread entry-point cast with a typed adapter.tclshlast and validate the final bytes as ABI-correct, genuinely fork-required, complete, non-Asyncify, and free of build/root/prefix/exact-zlib paths.exec.Exact source head
Base:
c5705667a90b05754d2244a362f3f7fc95d2f9c3Head:
632760bc250bf6c45157f9eb87fc5b2c2e10e498Formula blob:
d7835a01fa78a7c1e072e706afa9264d5753fad9Formula SHA-256:
fa16b11b7de5d316d1053b695a5fe66cba38fa4a08e7f069c1f33a3f5012f5e9The two-commit shape is intentional:
527e7b20ba1ea01f95986e7c9df5053ed8555f0fis the content-preserving c570 restack of the accepted functional Formula; its range-diff change is only README insertion context.632760bc250bf6c45157f9eb87fc5b2c2e10e498is a contract-only repair: load support through installed-tapTap.fetch, and replace the bespoke guard withkandelo_validate_wasm_artifact(tclsh, fork: :required, forbidden_paths: [zlib.to_s]).No configure/build/install/test behavior changed in the contract commit, and no target-byte change is intended.
Exact-head static evidence
git diff --check, scope, and clean-worktree checks passed.A fresh exact-head Homebrew source build/test was not run because the isolated build prefix was occupied by another package lane. The historical ABI 18 bottle is not used as substitute exact-head evidence.
Historical functional evidence
The accepted functional Formula previously established:
brew testpassed when layered with #892, covering language/files/packages, a real side module, a real Tcl pthread create/join, andexec /bin/echowasm32_kandelobottle SHA-2568126c749210815763722f28e680970ab00a4210f899ef07831e0bad4f7634dd8tclshwas ABI 18, fork-complete, non-Asyncify, and free of host/private pathsThat is historical functional evidence only. The bottle archive itself contains a Homebrew receipt source path, and no ABI 18 bottle is publishable after the consolidated ABI work.
Without #892, Tcl exposes a platform defect: its fork-child atfork callback restarts the notifier pthread, and the host misidentifies an unrelated export as
__wasm_call_ctors, producing an invalid thread module. #892 uses authoritative linker evidence, validates the constructor signature, gates clone success onthread_ready, and rolls back failed launches in both Node and browser. This Formula does not patch around that runtime defect.Source and final-byte gates
Source/platform merge waits on #873, #882, deterministic #888 on #889, and #892 after its post-#889 rebase/full rerun. #841 is unnecessary because the Formula uses a typed pthread adapter.
#842 and #874 are final-byte rebuild gates, followed by the consolidated ABI. They define final linked-output inputs even though they do not block source review.
#903 is not currently required because the historical 4.59 MB tclsh passed #882 extraction; final rebuilt bytes must still pass authoritative validation. #905 is unrelated because Tcl exercises direct fork/atfork, not
posix_spawnparentage.Publication gates
Publication order is #881 -> #887 -> #890 -> #885 plus tap #22. #887 supplies native Binaryen/WABT build-dependency prefixes; #895 supplies the clean
/bin/echoFormula-test base; #890/#900 enforce that same-tap zlib is resolved and poured from its prior exact bottle with provenance.Final sequence: land the ABI/toolchain stack; publish and pour exact zlib; build Tcl from that poured bottle under #900; publish Tcl; run literal stock Homebrew Node and Chromium pours.
This PR contains no bottle block, archive, sidecar, receipt, provenance metadata, Wasm artifact, platform change, or ABI change.