diff --git a/CHANGELOG.md b/CHANGELOG.md index 94ef18d1..7e8c969c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,18 @@ 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.24.1] - 2026-07-26 + +- make.tcl bakelist/bake: a nonexistent per-platform runtime store folder is now flagged + loudly instead of silently yielding all-missing rows - bakelist prints a stderr WARNING + showing the platform-canon derivation (tcl_platform os/platform -> canon) and marks the + header line (FOLDER MISSING); bake's no-runtimes exit carries the same self-diagnosis. + Classic trigger: an msys/cygwin-runtime tclsh (reports platform unix, canon e.g + mingw64-x86_64) deriving a store name that is not the windows store the kits use. +- make.tcl shell: 'help platforms' now renders (punk::platform added to the bootsupport + module set - it was absent from the snapshot, so the bootsupport-hosted shell degraded + to a package-not-available notice on any interpreter, not just msys hosts). + ## [0.24.0] - 2026-07-26 - make.tcl bakelist + selective bake (G-121): new informational `bakelist ?kitname ...?` diff --git a/goals/G-013-raw-mode-default.md b/goals/G-013-raw-mode-default.md index 55a6b052..adde377c 100644 --- a/goals/G-013-raw-mode-default.md +++ b/goals/G-013-raw-mode-default.md @@ -84,3 +84,4 @@ stays (see inventory item 4). the suite runtimes and kit shape; first enable of a session costs ~0.6-0.7s server spawn - an eager warm-up at repl init is noted there as a future nicety if raw becomes the default). See goals/archive/G-106-powershell-consolemode-fallback.md. +- 2026-07-26 field finding (msys/cygwin-runtime tclsh: scoop msys2 tclsh8.6 driving 'src/make.tcl shell' on windows): line mode is largely functional, but RAW mode places the cursor at row 1 after each command - the raw-mode cursor bookkeeping (cursor-position query/screen-state handling) does not yet cater for the msys pty terminal class. Recorded as a raw-mode-default blocker dimension alongside the existing cursor-move issues; the make.tcl host/target platform-split candidate goal drafted the same day is build-tooling only and deliberately excludes this console/repl work. diff --git a/punkproject.toml b/punkproject.toml index 697efe07..9432f0ac 100644 --- a/punkproject.toml +++ b/punkproject.toml @@ -1,4 +1,4 @@ [project] name = "punkshell" -version = "0.24.0" +version = "0.24.1" license = "BSD-2-Clause" diff --git a/src/AGENTS.md b/src/AGENTS.md index 7077c8eb..c5847988 100644 --- a/src/AGENTS.md +++ b/src/AGENTS.md @@ -72,7 +72,7 @@ Recovery after a wrong path guess: - make.tcl subcommands and flags are punk::args-declared (G-030): `tclsh src/make.tcl help ?subcommand?` or ` -help` shows tabled usage; invalid arguments produce punk::args usage errors. The dispatch degrades to plain scan/help when the bootsupport punk::args (or its rendering stack) is stale or unavailable; `PUNKBOOT_PLAIN=1` forces the degraded mode for troubleshooting. The `::punkboot::argdoc` definitions are constructed (string-built) and use the G-045 authoring mechanisms — block-form help values + `@normalize`, explicit `@form -synopsis` — see src/modules/AGENTS.md "punk::args definition authoring ergonomics" before editing them or authoring similar definitions. - Uncommitted `make.tcl`-generated outputs may be batched into one commit, regardless of how many `make.tcl` invocations produced them. This covers punkcheck-managed build outputs that are VCS-tracked: `src/bootsupport/`, `_vfscommon.vfs/modules` + `/lib`, declared per-kit `*.vfs/lib_tcl/` subfolders, the thin-layout sync copies (`src/project_layouts/vendor/punk//src/{make.tcl,build.tcl}` + bootsupport manifest copies), and the module-shipped layout payload under `src/modules/punk/mix/#modpod-templates-*/templates/project_layouts/` (G-087: synced from `src/project_layouts` - never hand-edit the modpod copy). (Root `modules/`, `lib/`, `modules_tcl/`, `lib_tcl/` are gitignored and never committed.) Each module's old→new version rename is atomic; a regeneration reflects one build-output refresh, not independent hand-edits. This is a carve-out from generic "split aggressively" commit guidance for punkcheck-managed build outputs only — it does not cover user-curated VFS content (`_config/`, per-kit `*.vfs/` outside declared `lib_tcl` subfolders, `_aside/`, `mkzipfix.vfs`, `_vfscommon.vfs/doc`), which commits separately per its own concerns. - Kit bakes consume the punk-runtime WORKING COPIES under `bin/runtime//`: `make.tcl bake`/`bakehouse` emit a `BUILD-WARNING:` (recapped at end of run) when a wrapped runtime's beside-toml revision is older than an `-r` artifact present in the same folder - the forgot-to-switch-back guard for deliberate `punk-runtime use ` testing excursions. Heed it before trusting freshly baked family kits; `bin/punk-runtime.cmd use >` (`.exe` suffix optional) re-materializes the working copy. -- `tclsh src/make.tcl bakelist ?kitname ...?` (G-121) reports the kit outputs configured in `src/runtime/mapvfs.config`: kit name, kit type, runtime (with presence in the runtime store), vfs folder, and the deployed state of `bin/` vs the `src/_build` build product (`current|stale|absent|nobuild`), with anomalies (`runtime=missing`, `vfs=missing`, `rtrev=r` materialization staleness) in a trailing notes column. Name arguments filter the report and add a per-kit detail block. `make.tcl bake ?kitname ...?` bakes and deploys only the named kits - other kits' `_build`/`bin` artifacts and punkcheck records are untouched and the vfslibs phase narrows to the named kits' vfs folders; an unknown name errors before any build, listing the configured names; flags go before kit names (`make.tcl bake -confirm 0 punk91`). Bare `bake` processes all configured kits as before. Both surfaces consume the shared parsed-mapping helpers (`::punkboot::lib::mapvfs_*`) rather than the file format, so the G-024 config-format work swaps the reader underneath. Piped characterization: `src/tests/shell/testsuites/punkexe/maketclbakelist.test`. +- `tclsh src/make.tcl bakelist ?kitname ...?` (G-121) reports the kit outputs configured in `src/runtime/mapvfs.config`: kit name, kit type, runtime (with presence in the runtime store), vfs folder, and the deployed state of `bin/` vs the `src/_build` build product (`current|stale|absent|nobuild`), with anomalies (`runtime=missing`, `vfs=missing`, `rtrev=r` materialization staleness) in a trailing notes column. A nonexistent per-platform store folder is flagged loudly (header `(FOLDER MISSING)` + stderr canon derivation; bake's no-runtimes exit self-diagnoses the same way) - the classic trigger is an msys/cygwin-runtime tclsh whose platform canon (e.g `mingw64-x86_64`) is not the windows store the kits use. Name arguments filter the report and add a per-kit detail block. `make.tcl bake ?kitname ...?` bakes and deploys only the named kits - other kits' `_build`/`bin` artifacts and punkcheck records are untouched and the vfslibs phase narrows to the named kits' vfs folders; an unknown name errors before any build, listing the configured names; flags go before kit names (`make.tcl bake -confirm 0 punk91`). Bare `bake` processes all configured kits as before. Both surfaces consume the shared parsed-mapping helpers (`::punkboot::lib::mapvfs_*`) rather than the file format, so the G-024 config-format work swaps the reader underneath. Piped characterization: `src/tests/shell/testsuites/punkexe/maketclbakelist.test`. - Use `punk make.tcl bakehouse` or `punk902z make.tcl bakehouse` inside Punk shell when building binaries through Punk (the deprecated `project` alias still maps). Driving make.tcl from a built punk executable is supported for informational/update subcommands and for kit builds of *other* kits — the kit whose deployed executable is running the build is skipped with a warning (it cannot be replaced while running, and the pre-deploy process sweep must not kill the build itself; the sweep also excludes the build's own pid in all cases). Rebuild that kit from tclsh or a different kit. - **Punk-exe-hosted make.tcl runs in a pre-loaded interp, not a virgin one** — the kit's script-mode boot has already loaded much of the punk stack (punk, punk::lib, punk::repl, punk::console, punk::du, flagfilter, struct::set ...) and set process state (app-punkscript forces `::tcl_interactive 0` for script semantics; libunknown/packagepreference are active). Consequences make.tcl must (and now does) handle explicitly: `package require` of an already-provided package is a no-op, so anything make.tcl breaks in the interp (the accelerator-reload block forgets+destroys sha1/md5/struct::* — it re-requires what was loaded), and anything computed at package-load time (punk::repl's `::tcl_interactive` probe — the shell branch recomputes it before `repl::start`), must be restored deliberately rather than relying on later loads to re-fire. Also note the copies that run in this mode are the *kit's* pre-loaded modules, not the bootsupport snapshots make.tcl's paths would otherwise prefer — silent provenance mixing when versions diverge. When adding interp-surgery or load-time-state assumptions to make.tcl, test under both `tclsh src/make.tcl ...` and ` src/make.tcl ...`. - Binary images are platform-specific; build on each target platform rather than expecting a cross-platform flag. diff --git a/src/bootsupport/modules/include_modules.config b/src/bootsupport/modules/include_modules.config index fac8ef64..95c2f4dc 100644 --- a/src/bootsupport/modules/include_modules.config +++ b/src/bootsupport/modules/include_modules.config @@ -104,6 +104,7 @@ set bootsupport_modules [list\ modules punk::ns\ modules punk::overlay\ modules punk::path\ + modules punk::platform\ modules punk::packagepreference\ modules punk::repl\ modules punk::repl::codethread\ diff --git a/src/make.tcl b/src/make.tcl index 83930762..88652cfd 100644 --- a/src/make.tcl +++ b/src/make.tcl @@ -3504,6 +3504,16 @@ if {$::punkboot::command eq "bakelist"} { set rtfolder $binfolder/runtime/$rt_os_arch set buildfolder $sourcefolder/_build set mapfile $sourcefolder/runtime/mapvfs.config + #Loud store-folder guard: a nonexistent per-platform runtime store makes every row + #read runtime=missing for a reason that is not per-entry. Classic trigger: an + #msys/cygwin-runtime tclsh reports tcl_platform(platform)=unix with an MSYS_NT*/ + #CYGWIN_NT* os, deriving a store name that is not the windows store the kits use. + set rt_store_missing [expr {![file isdirectory $rtfolder]}] + if {$rt_store_missing} { + puts stderr "WARNING: runtime store folder bin/runtime/$rt_os_arch does not exist - every configured runtime below will read runtime=missing." + puts stderr " The folder name derives from THIS tclsh's platform canon: tcl_platform(os)='$::tcl_platform(os)' tcl_platform(platform)='$::tcl_platform(platform)' -> '$this_platform_generic'." + puts stderr " An msys/cygwin-runtime tclsh reports platform unix and derives a non-windows store name - drive make.tcl with a native tclsh (or a punk kit executable) to inspect/bake this platform's kits." + } set mapmodel [punkboot::lib::mapvfs_parse $mapfile $rtfolder $sourcefolder] foreach errline [dict get $mapmodel configerrors] { puts stderr $errline @@ -3565,7 +3575,8 @@ if {$::punkboot::command eq "bakelist"} { } set widths $newwidths } - puts stdout "# mapvfs: src/runtime/mapvfs.config runtimes: bin/runtime/$rt_os_arch deployed: bin/ vs src/_build/" + set rt_store_note [expr {$rt_store_missing ? " (FOLDER MISSING)" : ""}] + puts stdout "# mapvfs: src/runtime/mapvfs.config runtimes: bin/runtime/$rt_os_arch$rt_store_note deployed: bin/ vs src/_build/" set headline "" foreach h $headings w $widths { append headline [format "%-*s " $w $h] @@ -4794,6 +4805,11 @@ foreach f $rtfolder_files { if {![llength $runtimes]} { puts stderr "No executable runtimes found in $rtfolder - unable to build any .vfs folders into executables." puts stderr "Add runtimes to $rtfolder if required" + if {![file isdirectory $rtfolder]} { + #same store-folder self-diagnosis as bakelist (msys/cygwin-runtime tclsh trigger) + puts stderr "NOTE: that runtime store folder does not exist. The name derives from THIS tclsh's platform canon: tcl_platform(os)='$::tcl_platform(os)' tcl_platform(platform)='$::tcl_platform(platform)' -> '$this_platform_generic'." + puts stderr " An msys/cygwin-runtime tclsh reports platform unix and derives a non-windows store name - drive make.tcl with a native tclsh (or a punk kit executable) to bake this platform's kits." + } #todo - don't exit - it is valid to use runtime of - to just build a .kit/.zipkit ? exit 0 }