Browse Source

punk::tcltestrun 0.3.1 + runtestmodules: _mint staging excluded from unbuilt-modpod scan

tm_path_additional_ifneeded (punk::tcltestrun) and its inline equivalent in
src/modules/test/runtestmodules.tcl called punk::path::subfolders with
-exclude {**/_build/** **/_build} - the G-155 _build -> _mint staging rename
never reached these call sites, so staged pods in <srcdir>/_mint were being
registered as bogus modules (e.g punk::mix::_mint::templates 0.2.0; measured
99 leaked _mint subfolder entries under src/modules across the two staging
trees src/modules/_mint + src/modules/punk/mix/_mint).

Both call sites now use the full option name and the pruning ***-tail form:
-exclude-paths {**/_build/*** **/_mint/***} (_build kept for legacy
checkouts). The ***-tail form prunes descent per punk::path 0.5.0, and
kit-baked punk::path 0.4.0 already accepts both the literal -exclude-paths
name and *** segments (G-093), so kit-child shadowing scenarios stay
compatible.

Verified: direct probe shows 0 _mint/_build subfolder entries and only
legitimate pods registered; runtests.tcl path.test 67/67 with no _mint
registrations in the harness startup.

Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
1eae726035
  1. 4
      src/modules/punk/tcltestrun-999999.0a1.0.tm
  2. 3
      src/modules/punk/tcltestrun-buildversion.txt
  3. 4
      src/modules/test/runtestmodules.tcl

4
src/modules/punk/tcltestrun-999999.0a1.0.tm

@ -373,8 +373,8 @@ tcl::namespace::eval punk::tcltestrun {
#when running against unbuilt modules - we want to ensure that the unbuilt versions of any modules are used rather than any installed versions - so we add package ifneeded definitions for the unbuilt versions of any modules that are present.
# add 'package ifneeded' definitions for unbuilt #modpod modules.
#first gather subdirectories of modules that contain #modpod-*-<version> in their name - these should be the unbuilt versions of zip based modules.
#'punk::path::subfolders' currently only supports negative matching with -exclude, so we have to filter for the positive match ourselves.
set subfolders [punk::path::subfolders -recursive -exclude {**/_build/** **/_build} $tmpath]
#'punk::path::subfolders' currently only supports negative matching with -exclude-paths, so we have to filter for the positive match ourselves.
set subfolders [punk::path::subfolders -recursive -exclude-paths {**/_build/*** **/_mint/***} $tmpath]
set script ""
foreach sub $subfolders {
#In most cases we could use string match - but the * within modpod-*-<version> could match a forward slash which could then match some other file under a #modpod- folder structure,

3
src/modules/punk/tcltestrun-buildversion.txt

@ -1,6 +1,7 @@
0.3.0
0.3.1
#First line must be a semantic version number
#all other lines are ignored.
#0.3.1 - fix: tm_path_additional_ifneeded exclude list missed the G-155 _build->_mint staging rename - staged pods in _mint were registered as bogus _mint::* modules; now -exclude-paths {**/_build/*** **/_mint/***} (full option name, ***-tail pruning form; _build kept for legacy checkouts)
#0.3.0 - breaking: tm_path_additional_ifneeded now requires project_root as a 2nd parameter to fix out-of-scope $project_root bug that caused 'no such variable' errors whenever #modpod modules were found
#0.3.0 - fix: #modpod version pattern is now extracted dynamically from directory name instead of hardcoded, preventing build-system version replacement from breaking pattern matching in built bootsupport copies
#0.3.0 - fix: runtests.tcl second tm_path_additional_ifneeded call now passes modules_tcl$tcl_major instead of modules (copy-paste bug)

4
src/modules/test/runtestmodules.tcl

@ -41,8 +41,8 @@ if {$test_type eq "unbuilt"} {
# add 'package ifneeded' definitions for unbuilt #modpod modules.
#first gather subdirectories of modules that contain #modpod-*-999999.0a1.0 in their name - these should be the unbuilt versions of zip based modules.
#set subfolders [punk::path::subfolders -recursive [file normalize $project_root/src/modules] -match */#modpod-*-999999.0a1.0]
#'punk::path::subfolders' currently only supports negative matching with -exclude, so we have to filter for the positive match ourselves.
set subfolders [punk::path::subfolders -recursive -exclude {**/_build/** **/_build} [file normalize $project_root/src/modules]]
#'punk::path::subfolders' currently only supports negative matching with -exclude-paths, so we have to filter for the positive match ourselves.
set subfolders [punk::path::subfolders -recursive -exclude-paths {**/_build/*** **/_mint/***} [file normalize $project_root/src/modules]]
foreach sub $subfolders {
#In most cases we could use string match - but the * within modpod-*-999999.0a1.0 could match a forward slash which could then match some other file under a #modpod- folder structure,
#so we use globmatchpath which treats * as matching any characters except path separators.

Loading…
Cancel
Save