From 0e30cf1af6cdc992f985c33c38f87dce861d57ea Mon Sep 17 00:00:00 2001 From: giles Date: Fri, 8 May 2026 09:33:48 +0000 Subject: [PATCH] =?UTF-8?q?plans:=20Phase=206=20verified=20399/399=20?= =?UTF-8?q?=E2=80=94=20vwait=20::=20deadlock=20fixed=20via=20tcl-var-looku?= =?UTF-8?q?p-or-nil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- plans/tcl-sx-completion.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plans/tcl-sx-completion.md b/plans/tcl-sx-completion.md index 9868351e..32d936f2 100644 --- a/plans/tcl-sx-completion.md +++ b/plans/tcl-sx-completion.md @@ -314,6 +314,17 @@ updates made inside Tcl proc bodies — only `:commands` was forwarded. Now forwards the full set. Surfaced when socket-async made fileevent-from-inside-proc the canonical pattern. +**Bug fix landed alongside:** `vwait ::var` was infinite-looping because +`vwait` used `frame-lookup` directly, which doesn't honour `::` global +routing. So after `set ::done fired` (which routes the write to the root +frame), `vwait ::done` kept reading the local frame and never saw the +change. Added `tcl-var-lookup-or-nil` helper that mirrors `tcl-var-get`'s +`::` routing but returns nil instead of erroring on missing vars; vwait +and `info exists` both use it now. + +**Total: 399/399 green** (parse 67, eval 169, error 39, namespace 22, +coro 20, idiom 82). + --- ## Suggested order @@ -332,6 +343,7 @@ becomes a lasting SX contribution used by every future hosted language. _Newest first._ +- 2026-05-08: Phase 6 verified — 399/399 (parse 67, eval 169, error 39, namespace 22, coro 20, idiom 82). Fixed vwait `::var` infinite loop via tcl-var-lookup-or-nil helper; info exists also uses it now. - 2026-05-07: Phase 6e exec — exec-process SX primitive (Unix.create_process+waitpid, captures stdout, errors on non-zero exit with stderr) + Tcl `exec cmd arg...`; +3 idiom tests - 2026-05-07: Phase 6d scan/format — printf-spec + scan-spec SX primitives wrapping OCaml Printf/Scanf via Scanf.format_from_string; Tcl format rewritten to dispatch via printf-spec; scan is real walker; supports d/i/u/x/X/o/c/s/f/e/E/g/G/% with width/precision/flags; +7 idiom tests - 2026-05-07: Phase 6c dict additions — dict lappend / remove / filter -key (rest of dict was already implemented); +3 idiom tests