From e26489fd57684b0d423e92ab19d56ba87d6235f2 Mon Sep 17 00:00:00 2001 From: Julian Noble Date: Fri, 31 Jul 2026 14:18:33 +1000 Subject: [PATCH] dtplite fallback: deployed lib_tcl9 tree replaces the retired vendored tcllib (punkshell 0.35.1) G-139's vendored-tree removal (70d1838c, 2026-07-30) broke bin/dtplite.cmd's no-tcllib fallback, which globbed only the retired src/vendorlib_tcl9//tcllib* trees - every execution usecase failed with "can't find package dtplite" (found by the G-123 acceptance walk's binscripts battery; dtplite.test had not run since the removal). The fallback now resolves the artifact-fed DEPLOYED tree lib_tcl9//tcllib (both the wrapped-in-bin and unwrapped script locations), keeping the vendorlib patterns for derived projects that still vendor. Re-wrapped; dtplite.test 8/8 under the punk baseline runner. Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com --- CHANGELOG.md | 9 +++++++++ bin/dtplite.cmd | 13 +++++++++---- punkproject.toml | 2 +- src/scriptapps/dtplite.tcl | 13 +++++++++---- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a8d3955..af6b0d0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,15 @@ The latest `## [X.Y.Z]` header must match the `version` field in `punkproject.to Entries are newest-first; one bullet per notable change. See the root `AGENTS.md` "Project Versioning" section for the bump policy. +## [0.35.1] - 2026-07-31 + +- `bin/dtplite.cmd` repaired (G-139 fallout, present since the vendored-tree + removal on 2026-07-30): its no-tcllib fallback still pointed at the retired + `src/vendorlib_tcl9//tcllib*` trees, so every execution usecase failed + with "can't find package dtplite". The fallback now resolves the artifact-fed + DEPLOYED tree `lib_tcl9/allplatforms/tcllib` first (vendorlib patterns + kept for derived projects that still vendor); dtplite.test back to 8/8. + ## [0.35.0] - 2026-07-31 - `punk-runtime` fetch now retrieves the beside-toml metadata sidecar for ANY diff --git a/bin/dtplite.cmd b/bin/dtplite.cmd index d617e546..55aa1e6b 100644 --- a/bin/dtplite.cmd +++ b/bin/dtplite.cmd @@ -1050,12 +1050,17 @@ namespace eval ::punk::multishell { # @@ Meta End if {[catch {package require dtplite 1.0.5}]} { - # Fall back to the project-vendored tcllib (pure Tcl) when the invoking - # tclsh has no tcllib installed. Works both unwrapped (src/scriptapps/dtplite.tcl) - # and wrapped (/bin/dtplite.cmd) - each is one level below a folder - # containing (or sibling to) src/vendorlib_tcl9//tcllib + # Fall back to the project's tcllib (pure Tcl) when the invoking tclsh has + # no tcllib installed. Since G-139 the punkshell tree's tcllib is the + # artifact-fed DEPLOYED tree lib_tcl9/allplatforms/tcllib (populated + # via 'make.tcl libfetch' + the PACKAGES deploy phase); the vendorlib_tcl9 + # patterns are kept for derived projects that still vendor a tcllib copy. + # Works both unwrapped (src/scriptapps/dtplite.tcl) and wrapped + # (/bin/dtplite.cmd). set selfdir [file dirname [file dirname [file normalize [info script]/__]]] foreach libdir [glob -nocomplain -types d -directory $selfdir\ + ../lib_tcl9/*/tcllib*\ + ../../lib_tcl9/*/tcllib*\ ../vendorlib_tcl9/*/tcllib*\ ../src/vendorlib_tcl9/*/tcllib*] { set libdir [file normalize $libdir] diff --git a/punkproject.toml b/punkproject.toml index 90f1963e..c307e004 100644 --- a/punkproject.toml +++ b/punkproject.toml @@ -1,4 +1,4 @@ [project] name = "punkshell" -version = "0.35.0" +version = "0.35.1" license = "BSD-2-Clause" diff --git a/src/scriptapps/dtplite.tcl b/src/scriptapps/dtplite.tcl index 2a69a181..55914ea8 100644 --- a/src/scriptapps/dtplite.tcl +++ b/src/scriptapps/dtplite.tcl @@ -17,12 +17,17 @@ # @@ Meta End if {[catch {package require dtplite 1.0.5}]} { - # Fall back to the project-vendored tcllib (pure Tcl) when the invoking - # tclsh has no tcllib installed. Works both unwrapped (src/scriptapps/dtplite.tcl) - # and wrapped (/bin/dtplite.cmd) - each is one level below a folder - # containing (or sibling to) src/vendorlib_tcl9//tcllib + # Fall back to the project's tcllib (pure Tcl) when the invoking tclsh has + # no tcllib installed. Since G-139 the punkshell tree's tcllib is the + # artifact-fed DEPLOYED tree lib_tcl9/allplatforms/tcllib (populated + # via 'make.tcl libfetch' + the PACKAGES deploy phase); the vendorlib_tcl9 + # patterns are kept for derived projects that still vendor a tcllib copy. + # Works both unwrapped (src/scriptapps/dtplite.tcl) and wrapped + # (/bin/dtplite.cmd). set selfdir [file dirname [file dirname [file normalize [info script]/__]]] foreach libdir [glob -nocomplain -types d -directory $selfdir\ + ../lib_tcl9/*/tcllib*\ + ../../lib_tcl9/*/tcllib*\ ../vendorlib_tcl9/*/tcllib*\ ../src/vendorlib_tcl9/*/tcllib*] { set libdir [file normalize $libdir]