Browse Source

build outputs: libunknown 0.2.2 promoted (bootsupport + _vfscommon payload)

make.tcl modules + bootsupport + vfscommonupdate after the G-120 fix; punkcheck
managed copies batched per src/AGENTS.md build-output commit carve-out.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 5 days ago
parent
commit
3808ec0914
  1. 28
      src/bootsupport/modules/punk/args-0.12.7.tm
  2. 47
      src/bootsupport/modules/punk/libunknown-0.2.2.tm
  3. 16
      src/bootsupport/modules/punk/mod-0.1.1.tm
  4. 4
      src/bootsupport/modules/punk/repl-0.5.3.tm
  5. 47
      src/vfs/_vfscommon.vfs/modules/punk/libunknown-0.2.2.tm

28
src/bootsupport/modules/punk/args-0.12.6.tm → src/bootsupport/modules/punk/args-0.12.7.tm

@ -8,7 +8,7 @@
# (C) 2024 # (C) 2024
# #
# @@ Meta Begin # @@ Meta Begin
# Application punk::args 0.12.6 # Application punk::args 0.12.7
# Meta platform tcl # Meta platform tcl
# Meta license <unspecified> # Meta license <unspecified>
# @@ Meta End # @@ Meta End
@ -18,7 +18,7 @@
# doctools header # doctools header
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++
#*** !doctools #*** !doctools
#[manpage_begin punkshell_module_punk::args 0 0.12.6] #[manpage_begin punkshell_module_punk::args 0 0.12.7]
#[copyright "2024"] #[copyright "2024"]
#[titledesc {args parsing}] [comment {-- Name section and table of contents description --}] #[titledesc {args parsing}] [comment {-- Name section and table of contents description --}]
#[moddesc {args to nested dict of opts and values}] [comment {-- Description at end of page heading --}] #[moddesc {args to nested dict of opts and values}] [comment {-- Description at end of page heading --}]
@ -4765,8 +4765,26 @@ tcl::namespace::eval punk::args {
} else { } else {
set needed [list] set needed [list]
foreach pkgns $nslist { foreach pkgns $nslist {
if {[string match (autodef)* $pkgns]} { if {[string match {(*)*} $pkgns]} {
set pkgns [string range $pkgns 9 end] #tag-prefixed id 'namespace' e.g (autodef)::myensemble, or a
#script-level id family e.g (script)::punkboot, (script)::punkexe.
#Not a real namespace: the scan records documenting packages under
#the TAGGED key (namespace qualifiers of the tagged id), so consult
#namespace_docpackages with the original key first, then strip the
#tag for the real-namespace probes below ((autodef) ids also map to
#a real namespace; a bare tag or tag-only qualifier has nothing more
#to probe).
if {[dict exists $namespace_docpackages $pkgns]} {
foreach docns [dict get $namespace_docpackages $pkgns] {
if {$docns ni $loaded_packages && $docns ni $needed} {
lappend needed $docns
}
}
}
set pkgns [string range $pkgns [expr {[string first ) $pkgns]+1}] end]
if {$pkgns eq ""} {
continue
}
} }
if {![string match ::* $pkgns]} { if {![string match ::* $pkgns]} {
puts stderr "warning: update_definitions received unqualified ns: $pkgns" puts stderr "warning: update_definitions received unqualified ns: $pkgns"
@ -14071,7 +14089,7 @@ package provide punk::args [tcl::namespace::eval punk::args {
tcl::namespace::path {::punk::args::lib ::punk::args::system} tcl::namespace::path {::punk::args::lib ::punk::args::system}
variable pkg punk::args variable pkg punk::args
variable version variable version
set version 0.12.6 set version 0.12.7
}] }]
return return

47
src/bootsupport/modules/punk/libunknown-0.2.1.tm → src/bootsupport/modules/punk/libunknown-0.2.2.tm

@ -7,7 +7,7 @@
# (C) 2025 # (C) 2025
# #
# @@ Meta Begin # @@ Meta Begin
# Application punk::libunknown 0.2.1 # Application punk::libunknown 0.2.2
# Meta platform tcl # Meta platform tcl
# Meta license MIT # Meta license MIT
# @@ Meta End # @@ Meta End
@ -18,6 +18,19 @@
# from src/modules/AGENTS.md "Versioning And Releases" - bumping means # from src/modules/AGENTS.md "Versioning And Releases" - bumping means
# renaming the file AND updating the Meta line above, the manpage_begin line # renaming the file AND updating the Meta line above, the manpage_begin line
# below and the provide-block version, then appending a line here): # below and the provide-block version, then appending a line here):
#0.2.2 - zipfs_tm_UnknownHandler: the builtin-static shortcircuit probe interp no
# longer leaks (G-120). The probe child interp was created under the fixed
# name ptest and deleted only on the non-error paths; an unversioned
# 'package require foo' of a static package made the version check
# 'package vsatisfies $v' throw (wrong # args - vsatisfies needs >=1
# requirement), skipping the delete. The leaked child held registrations
# on the process std channels (Tcl shares them into non-safe child
# interps), so an explicit 'chan close stderr' left the OS handle alive
# and the std slot occupied - the next opened channel got a fileN name
# instead of recycling into stderr. Now: auto-named probe interp, deleted
# in a try/finally; zero-requirement requires treat any provided version
# as satisfying; probe errors fall through to the normal tm search
# instead of aborting the require.
#0.2.1 - zipfs_tm_UnknownHandler: the zipfs static-path can_skip_update state is #0.2.1 - zipfs_tm_UnknownHandler: the zipfs static-path can_skip_update state is
# written keyed by the SPECIFIC searchpath actually scanned (tm path + # written keyed by the SPECIFIC searchpath actually scanned (tm path +
# package namespace subdir) to match its reader and libunknown::init's # package namespace subdir) to match its reader and libunknown::init's
@ -42,7 +55,7 @@
# doctools header # doctools header
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++
#*** !doctools #*** !doctools
#[manpage_begin punkshell_module_punk::libunknown 0 0.2.1] #[manpage_begin punkshell_module_punk::libunknown 0 0.2.2]
#[copyright "2025"] #[copyright "2025"]
#[titledesc {Module API}] [comment {-- Name section and table of contents description --}] #[titledesc {Module API}] [comment {-- Name section and table of contents description --}]
#[moddesc {-}] [comment {-- Description at end of page heading --}] #[moddesc {-}] [comment {-- Description at end of page heading --}]
@ -190,22 +203,36 @@ tcl::namespace::eval ::punk::libunknown {
set loaded [lsearch -inline -index 1 -nocase [info loaded] $name] set loaded [lsearch -inline -index 1 -nocase [info loaded] $name]
if {[llength $loaded] == 2 && [lindex $loaded 0] eq ""} { if {[llength $loaded] == 2 && [lindex $loaded 0] eq ""} {
lassign $loaded _ cased_name lassign $loaded _ cased_name
interp create ptest #Version-probe the static package in a throwaway child interp.
ptest eval [list load {} $cased_name] #The child must never outlive this block: a (non-safe) child interp
set static_version [ptest eval [list package provide [string tolower $cased_name]]] #holds registrations on the process std channels, so a leaked probe
#interp disables Tcl's std-slot recycling process-wide (after
#'chan close stderr' the OS handle stays alive and the slot stays
#occupied, so the next opened channel cannot become stderr) - G-120.
set probeinterp [interp create]
try {
interp eval $probeinterp [list load {} $cased_name]
set static_version [interp eval $probeinterp [list package provide [string tolower $cased_name]]]
set pname [string tolower $cased_name] set pname [string tolower $cased_name]
if {$static_version eq ""} { if {$static_version eq ""} {
set static_version [ptest eval [list package provide $cased_name]] set static_version [interp eval $probeinterp [list package provide $cased_name]]
set pname $cased_name set pname $cased_name
} }
if {$static_version ne ""} { if {$static_version ne ""} {
if {[package vsatisfies $static_version {*}$args]} { #zero requirements (plain 'package require foo') accepts any
#provided version; package vsatisfies errors without at least
#one requirement argument.
if {![llength $args] || [package vsatisfies $static_version {*}$args]} {
package ifneeded $pname $static_version [list load {} $cased_name] package ifneeded $pname $static_version [list load {} $cased_name]
interp delete ptest
return return
} }
} }
interp delete ptest } on error {} {
#probe failure (e.g a static whose init needs more than a bare
#child interp) - not fatal: fall through to the normal tm search.
} finally {
interp delete $probeinterp
}
} }
#------------------------------ #------------------------------
@ -2130,7 +2157,7 @@ namespace eval ::punk::args::register {
package provide punk::libunknown [tcl::namespace::eval ::punk::libunknown { package provide punk::libunknown [tcl::namespace::eval ::punk::libunknown {
variable pkg punk::libunknown variable pkg punk::libunknown
variable version variable version
set version 0.2.1 set version 0.2.2
}] }]
return return

16
src/bootsupport/modules/punk/mod-0.1.1.tm

@ -71,12 +71,16 @@ namespace eval punk::mod::cli {
} }
} }
dict set appinfo versions $versions dict set appinfo versions $versions
#todo - natsort! #version-aware selection (2026-07-22 audit): was a plain lexical lsort
set sorted_versions [lsort $versions] #(1.10 sorts before 1.9) with lindex 0 - the LOWEST - as 'latest'.
set latest [lindex $sorted_versions 0] #Empty version (unversioned main) is excluded from comparison (package
if {$latest eq "" && [llength $sorted_versions] > 1} { #vcompare errors on empty operands); latest = highest by vcompare.
set latest [lindex $sorted_versions 1] set realversions {}
} foreach v $versions {
if {$v ne ""} {lappend realversions $v}
}
set sorted_versions [lsort -command {package vcompare} $realversions]
set latest [lindex $sorted_versions end] ;#"" when only an unversioned main exists
dict set appinfo latest $latest dict set appinfo latest $latest
dict set appinfo bases $bases dict set appinfo bases $bases

4
src/bootsupport/modules/punk/repl-0.5.2.tm → src/bootsupport/modules/punk/repl-0.5.3.tm

@ -4290,6 +4290,7 @@ namespace eval repl {
package require punk::lib package require punk::lib
package require punk::args package require punk::args
catch {package require punk::args::moduledoc::tclcore} ;#while tclcore is highly desirable, and should be installed with punk::args - it's not critical catch {package require punk::args::moduledoc::tclcore} ;#while tclcore is highly desirable, and should be installed with punk::args - it's not critical
catch {package require punk::args::moduledoc::punkexe} ;#launch subcommand family documentation (G-118) - not critical
package require textblock package require textblock
} }
@ -4470,6 +4471,7 @@ namespace eval repl {
catch {package require punk::args::moduledoc::parser} catch {package require punk::args::moduledoc::parser}
#----------- #-----------
catch {package require punk::args::moduledoc::tclcore} ;#while tclcore is highly desirable, and should be installed with punk::args - it's not critical catch {package require punk::args::moduledoc::tclcore} ;#while tclcore is highly desirable, and should be installed with punk::args - it's not critical
catch {package require punk::args::moduledoc::punkexe} ;#launch subcommand family documentation (G-118) - not critical
} errM]} { } errM]} {
puts stderr "========================" puts stderr "========================"
puts stderr "code interp error:" puts stderr "code interp error:"
@ -4565,7 +4567,7 @@ namespace eval ::punk::args::register {
package provide punk::repl [namespace eval punk::repl { package provide punk::repl [namespace eval punk::repl {
variable version variable version
set version 0.5.2 set version 0.5.3
}] }]
#repl::start $program_read_stdin_pipe #repl::start $program_read_stdin_pipe

47
src/vfs/_vfscommon.vfs/modules/punk/libunknown-0.2.1.tm → src/vfs/_vfscommon.vfs/modules/punk/libunknown-0.2.2.tm

@ -7,7 +7,7 @@
# (C) 2025 # (C) 2025
# #
# @@ Meta Begin # @@ Meta Begin
# Application punk::libunknown 0.2.1 # Application punk::libunknown 0.2.2
# Meta platform tcl # Meta platform tcl
# Meta license MIT # Meta license MIT
# @@ Meta End # @@ Meta End
@ -18,6 +18,19 @@
# from src/modules/AGENTS.md "Versioning And Releases" - bumping means # from src/modules/AGENTS.md "Versioning And Releases" - bumping means
# renaming the file AND updating the Meta line above, the manpage_begin line # renaming the file AND updating the Meta line above, the manpage_begin line
# below and the provide-block version, then appending a line here): # below and the provide-block version, then appending a line here):
#0.2.2 - zipfs_tm_UnknownHandler: the builtin-static shortcircuit probe interp no
# longer leaks (G-120). The probe child interp was created under the fixed
# name ptest and deleted only on the non-error paths; an unversioned
# 'package require foo' of a static package made the version check
# 'package vsatisfies $v' throw (wrong # args - vsatisfies needs >=1
# requirement), skipping the delete. The leaked child held registrations
# on the process std channels (Tcl shares them into non-safe child
# interps), so an explicit 'chan close stderr' left the OS handle alive
# and the std slot occupied - the next opened channel got a fileN name
# instead of recycling into stderr. Now: auto-named probe interp, deleted
# in a try/finally; zero-requirement requires treat any provided version
# as satisfying; probe errors fall through to the normal tm search
# instead of aborting the require.
#0.2.1 - zipfs_tm_UnknownHandler: the zipfs static-path can_skip_update state is #0.2.1 - zipfs_tm_UnknownHandler: the zipfs static-path can_skip_update state is
# written keyed by the SPECIFIC searchpath actually scanned (tm path + # written keyed by the SPECIFIC searchpath actually scanned (tm path +
# package namespace subdir) to match its reader and libunknown::init's # package namespace subdir) to match its reader and libunknown::init's
@ -42,7 +55,7 @@
# doctools header # doctools header
# ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++ # ++ +++ +++ +++ +++ +++ +++ +++ +++ +++ +++
#*** !doctools #*** !doctools
#[manpage_begin punkshell_module_punk::libunknown 0 0.2.1] #[manpage_begin punkshell_module_punk::libunknown 0 0.2.2]
#[copyright "2025"] #[copyright "2025"]
#[titledesc {Module API}] [comment {-- Name section and table of contents description --}] #[titledesc {Module API}] [comment {-- Name section and table of contents description --}]
#[moddesc {-}] [comment {-- Description at end of page heading --}] #[moddesc {-}] [comment {-- Description at end of page heading --}]
@ -190,22 +203,36 @@ tcl::namespace::eval ::punk::libunknown {
set loaded [lsearch -inline -index 1 -nocase [info loaded] $name] set loaded [lsearch -inline -index 1 -nocase [info loaded] $name]
if {[llength $loaded] == 2 && [lindex $loaded 0] eq ""} { if {[llength $loaded] == 2 && [lindex $loaded 0] eq ""} {
lassign $loaded _ cased_name lassign $loaded _ cased_name
interp create ptest #Version-probe the static package in a throwaway child interp.
ptest eval [list load {} $cased_name] #The child must never outlive this block: a (non-safe) child interp
set static_version [ptest eval [list package provide [string tolower $cased_name]]] #holds registrations on the process std channels, so a leaked probe
#interp disables Tcl's std-slot recycling process-wide (after
#'chan close stderr' the OS handle stays alive and the slot stays
#occupied, so the next opened channel cannot become stderr) - G-120.
set probeinterp [interp create]
try {
interp eval $probeinterp [list load {} $cased_name]
set static_version [interp eval $probeinterp [list package provide [string tolower $cased_name]]]
set pname [string tolower $cased_name] set pname [string tolower $cased_name]
if {$static_version eq ""} { if {$static_version eq ""} {
set static_version [ptest eval [list package provide $cased_name]] set static_version [interp eval $probeinterp [list package provide $cased_name]]
set pname $cased_name set pname $cased_name
} }
if {$static_version ne ""} { if {$static_version ne ""} {
if {[package vsatisfies $static_version {*}$args]} { #zero requirements (plain 'package require foo') accepts any
#provided version; package vsatisfies errors without at least
#one requirement argument.
if {![llength $args] || [package vsatisfies $static_version {*}$args]} {
package ifneeded $pname $static_version [list load {} $cased_name] package ifneeded $pname $static_version [list load {} $cased_name]
interp delete ptest
return return
} }
} }
interp delete ptest } on error {} {
#probe failure (e.g a static whose init needs more than a bare
#child interp) - not fatal: fall through to the normal tm search.
} finally {
interp delete $probeinterp
}
} }
#------------------------------ #------------------------------
@ -2130,7 +2157,7 @@ namespace eval ::punk::args::register {
package provide punk::libunknown [tcl::namespace::eval ::punk::libunknown { package provide punk::libunknown [tcl::namespace::eval ::punk::libunknown {
variable pkg punk::libunknown variable pkg punk::libunknown
variable version variable version
set version 0.2.1 set version 0.2.2
}] }]
return return
Loading…
Cancel
Save