diff --git a/src/bootsupport/modules/punk-0.2.6.tm b/src/bootsupport/modules/punk-0.2.7.tm similarity index 99% rename from src/bootsupport/modules/punk-0.2.6.tm rename to src/bootsupport/modules/punk-0.2.7.tm index c623c2e3..aac58c5f 100644 --- a/src/bootsupport/modules/punk-0.2.6.tm +++ b/src/bootsupport/modules/punk-0.2.7.tm @@ -8983,10 +8983,77 @@ namespace eval punk { return $chunks } - register topics {help} "List help topics" - register tcl {} "Tcl version warnings" - register env {environment} "punkshell environment vars" - register console {term terminal} "Some console behaviour tests and warnings" + punk::args::define { + @id -id ::punk::helptopic::platforms + @cmd -name "help platforms"\ + -summary\ + "Canonical punkshell platform names."\ + -help\ + "Show the canonical punkshell platform-dir names + (punk::platform::platforms) with status, the artifact-tree + tiers each name serves, and the buildsuite axis (whether the + punkshell zig buildsuites produce runtimes for the platform - + separate from hosting: punkbin-structured repos can carry + runtimes built by any mechanism), marking the running + interpreter's own platform. These names organize the punkbin + artifact repo's platform folders, bin/runtime// + (punk-runtime fetch/list/use -platform), the lib_tclX / + vendorlib_tclX auto_path dirs wired by the boot, and the + runtime-artifact metadata target field. The raw Tcl + platform-package identifiers are shown for comparison + (punk::platform::normalize folds their version-dependent + aliases - amd64/aarch64/macos - into the canonical names)." + @values -min 0 -max 0 + } + proc platforms {context args} { + if {[catch {package require punk::platform} errM]} { + return [list [list stderr "help platforms: punk::platform package not available ($errM)\n"]] + } + set frametype [dict get $context frametype] + set chunks [list] + set local_lib [punk::platform::local -tier lib] + set local_runtime [punk::platform::local -tier runtime] + set title "[a+ brightgreen] Canonical punkshell platform names: " + set t [textblock::class::table new -show_seps 0] + $t configure -frametype $frametype + $t add_column -headers [list "Platform"] + $t add_column -headers [list "Status"] + $t add_column -headers [list "Tiers"] + $t add_column -headers [list "Buildsuite"] + $t add_column -headers [list "Notes"] + dict for {p pinfo} [punk::platform::platforms] { + set pshown $p + if {$p eq $local_lib || $p eq $local_runtime} { + set pshown "* $p" + } + $t add_row [list $pshown [dict get $pinfo status] [join [dict get $pinfo tiers] ,] [dict get $pinfo buildsuite] [dict get $pinfo notes]] + } + foreach c {0 1 2 3} { + $t configure_column $c -minwidth [expr {[$t column_datawidth $c] + 2}] + } + $t configure -title $title + set text [$t print] + $t destroy + lappend chunks [list stdout $text] + set detail "* = this interpreter. local: lib-tier $local_lib" + if {$local_runtime ne $local_lib} { + append detail " runtime-tier $local_runtime" + } + append detail "\ntiers: runtime = punkbin + bin/runtime folders; lib = lib_tclX/vendorlib_tclX auto_path dirs" + append detail "\nbuildsuite: whether the punkshell zig buildsuites produce runtimes for the platform" + append detail "\n(a separate axis - punkbin-structured repos can host runtimes built by any mechanism)" + catch { + append detail "\nraw Tcl platform package ([package present platform]): generic [platform::generic] identify [platform::identify]" + } + lappend chunks [list stdout $detail\n] + return $chunks + } + + register topics {help} "List help topics" + register tcl {} "Tcl version warnings" + register env {environment} "punkshell environment vars" + register console {term terminal} "Some console behaviour tests and warnings" + register platforms {platform} "Canonical punkshell platform names" } #return list of {chan chunk} elements @@ -9438,7 +9505,7 @@ punkcheck::cli set_alias punkcheck package provide punk [namespace eval punk { #FUNCTL variable version - set version 0.2.6 + set version 0.2.7 }]