diff --git a/src/bootsupport/modules/punk/mix/cli-0.6.0.tm b/src/bootsupport/modules/punk/mix/cli-0.6.1.tm similarity index 98% rename from src/bootsupport/modules/punk/mix/cli-0.6.0.tm rename to src/bootsupport/modules/punk/mix/cli-0.6.1.tm index 99de7593..da86c053 100644 --- a/src/bootsupport/modules/punk/mix/cli-0.6.0.tm +++ b/src/bootsupport/modules/punk/mix/cli-0.6.1.tm @@ -7,7 +7,7 @@ # (C) 2023 # # @@ Meta Begin -# Application punk::mix::cli 0.6.0 +# Application punk::mix::cli 0.6.1 # Meta platform tcl # Meta license # @@ Meta End @@ -1560,13 +1560,23 @@ namespace eval punk::mix::cli { set goals [list] if {$calltype eq "lib"} { - file mkdir ~/.kettle - set dotfile ~/.kettle/config - if {[file exists $dotfile] && - [file isfile $dotfile] && - [file readable $dotfile]} { - ::kettle io trace {Loading dotfile $dotfile ...} - set args [list {*}[::kettle path cat $dotfile] {*}$args] + #Tcl 9 removed tilde expansion - a raw ~ here is a cwd-relative literal path and + #litters a ./~/.kettle dir wherever kettle_call runs (e.g project generation). + #Resolve the user's home explicitly; no resolvable home just means no dotfile config. + set kettlehome {} + catch {set kettlehome [file home]} ;#Tcl 8.7+/9 + if {$kettlehome eq {}} { + catch {set kettlehome [file normalize ~]} ;#Tcl 8.6 native tilde expansion + } + if {$kettlehome ne {}} { + catch {file mkdir [file join $kettlehome .kettle]} + set dotfile [file join $kettlehome .kettle config] + if {[file exists $dotfile] && + [file isfile $dotfile] && + [file readable $dotfile]} { + ::kettle io trace {Loading dotfile $dotfile ...} + set args [list {*}[::kettle path cat $dotfile] {*}$args] + } } } @@ -1663,6 +1673,6 @@ namespace eval punk::mix::cli { ## Ready package provide punk::mix::cli [namespace eval punk::mix::cli { variable version - set version 0.6.0 + set version 0.6.1 }] return diff --git a/src/modules/punk/mix/cli-999999.0a1.0.tm b/src/modules/punk/mix/cli-999999.0a1.0.tm index 6e59bb2c..63e4778e 100644 --- a/src/modules/punk/mix/cli-999999.0a1.0.tm +++ b/src/modules/punk/mix/cli-999999.0a1.0.tm @@ -1560,13 +1560,23 @@ namespace eval punk::mix::cli { set goals [list] if {$calltype eq "lib"} { - file mkdir ~/.kettle - set dotfile ~/.kettle/config - if {[file exists $dotfile] && - [file isfile $dotfile] && - [file readable $dotfile]} { - ::kettle io trace {Loading dotfile $dotfile ...} - set args [list {*}[::kettle path cat $dotfile] {*}$args] + #Tcl 9 removed tilde expansion - a raw ~ here is a cwd-relative literal path and + #litters a ./~/.kettle dir wherever kettle_call runs (e.g project generation). + #Resolve the user's home explicitly; no resolvable home just means no dotfile config. + set kettlehome {} + catch {set kettlehome [file home]} ;#Tcl 8.7+/9 + if {$kettlehome eq {}} { + catch {set kettlehome [file normalize ~]} ;#Tcl 8.6 native tilde expansion + } + if {$kettlehome ne {}} { + catch {file mkdir [file join $kettlehome .kettle]} + set dotfile [file join $kettlehome .kettle config] + if {[file exists $dotfile] && + [file isfile $dotfile] && + [file readable $dotfile]} { + ::kettle io trace {Loading dotfile $dotfile ...} + set args [list {*}[::kettle path cat $dotfile] {*}$args] + } } } diff --git a/src/modules/punk/mix/cli-buildversion.txt b/src/modules/punk/mix/cli-buildversion.txt index d70afc95..22a18f28 100644 --- a/src/modules/punk/mix/cli-buildversion.txt +++ b/src/modules/punk/mix/cli-buildversion.txt @@ -1,6 +1,7 @@ -0.6.0 +0.6.1 #First line must be a semantic version number #all other lines are ignored. +#0.6.1 - kettle_call lib-mode dotfile handling: resolve the user's home explicitly ([file home] on 8.7+/9, native ~ expansion via [file normalize ~] on 8.6) instead of raw ~ paths - Tcl 9 removed tilde expansion, so 'file mkdir ~/.kettle' created a literal ./~/.kettle dir in the cwd (littered generated projects via the dev project.new kettledoc step); no resolvable home now just skips the optional dotfile config, and the mkdir is catch-guarded. Companion local patch in src/vendorlib/kettle1/app.tcl (kettle's own dotfile read had the same hazard - silently ignored config under tcl9) #0.6.0 - G-155 stage vocabulary: modpod/tarjar mint staging moved /_build -> /_mint (mintfolder var; _mint/_bake added to antidir + reserved_words, old _build stays tolerated); running-from-workdir check follows src/_build -> src/_bake; build_modules_from_source_to_base KEEPS its name (punkcheck -installer identity - G-156 owns any rename); mint-verb error text; removed a dead never-read 'build' path assignment #0.5.2 - modpod zip build: zipfs mkzip failure now falls back to punk::zip::mkzip (the established zipfs-less path) with a stderr note naming the interp and upstream ticket. Motivation: Tcl 8.7 builds predating core fix c971e6c7c4 (tkt 7d5f1c13089d463e7796 'zipfs mkzip broken on Windows dotfiles') die with 'non-unique path name' on dot-prefixed entries - hit by the templates modpod's layout .fossil-custom payloads (present since G-087 stage 3) when built under 8.7a6 #0.5.1 - comment-only: removed commented-out legacy punkcheck proc-pipeline call sites (installfile_begin/started/finished/skipped, start_installer_event) alongside their live OO equivalents - the legacy procs are retired to error shims in punkcheck 0.5.0 (G-094); no behaviour change diff --git a/src/vendorlib/kettle1/app.tcl b/src/vendorlib/kettle1/app.tcl index af77b43a..b3206bb1 100644 --- a/src/vendorlib/kettle1/app.tcl +++ b/src/vendorlib/kettle1/app.tcl @@ -65,7 +65,17 @@ proc ::kettle::Application {} { set goals {} - set dotfile ~/.kettle/config + # punkshell local patch 2026-08-03 (tcl9 compat - reapply on vendor upgrade): + # Tcl 9 removed tilde expansion, so a raw ~ is read as a cwd-relative literal + # path and the dotfile would be silently ignored. Resolve home explicitly. + set kettlehome {} + catch {set kettlehome [file home]} + if {$kettlehome eq {}} {catch {set kettlehome [file normalize ~]}} + if {$kettlehome ne {}} { + set dotfile [file join $kettlehome .kettle config] + } else { + set dotfile {} + } if {[file exists $dotfile] && [file isfile $dotfile] && [file readable $dotfile]} { diff --git a/src/vfs/_vfscommon.vfs/lib/kettle1/app.tcl b/src/vfs/_vfscommon.vfs/lib/kettle1/app.tcl index af77b43a..b3206bb1 100644 --- a/src/vfs/_vfscommon.vfs/lib/kettle1/app.tcl +++ b/src/vfs/_vfscommon.vfs/lib/kettle1/app.tcl @@ -65,7 +65,17 @@ proc ::kettle::Application {} { set goals {} - set dotfile ~/.kettle/config + # punkshell local patch 2026-08-03 (tcl9 compat - reapply on vendor upgrade): + # Tcl 9 removed tilde expansion, so a raw ~ is read as a cwd-relative literal + # path and the dotfile would be silently ignored. Resolve home explicitly. + set kettlehome {} + catch {set kettlehome [file home]} + if {$kettlehome eq {}} {catch {set kettlehome [file normalize ~]}} + if {$kettlehome ne {}} { + set dotfile [file join $kettlehome .kettle config] + } else { + set dotfile {} + } if {[file exists $dotfile] && [file isfile $dotfile] && [file readable $dotfile]} { diff --git a/src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.0.tm b/src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.1.tm similarity index 98% rename from src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.0.tm rename to src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.1.tm index 99de7593..da86c053 100644 --- a/src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.0.tm +++ b/src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.1.tm @@ -7,7 +7,7 @@ # (C) 2023 # # @@ Meta Begin -# Application punk::mix::cli 0.6.0 +# Application punk::mix::cli 0.6.1 # Meta platform tcl # Meta license # @@ Meta End @@ -1560,13 +1560,23 @@ namespace eval punk::mix::cli { set goals [list] if {$calltype eq "lib"} { - file mkdir ~/.kettle - set dotfile ~/.kettle/config - if {[file exists $dotfile] && - [file isfile $dotfile] && - [file readable $dotfile]} { - ::kettle io trace {Loading dotfile $dotfile ...} - set args [list {*}[::kettle path cat $dotfile] {*}$args] + #Tcl 9 removed tilde expansion - a raw ~ here is a cwd-relative literal path and + #litters a ./~/.kettle dir wherever kettle_call runs (e.g project generation). + #Resolve the user's home explicitly; no resolvable home just means no dotfile config. + set kettlehome {} + catch {set kettlehome [file home]} ;#Tcl 8.7+/9 + if {$kettlehome eq {}} { + catch {set kettlehome [file normalize ~]} ;#Tcl 8.6 native tilde expansion + } + if {$kettlehome ne {}} { + catch {file mkdir [file join $kettlehome .kettle]} + set dotfile [file join $kettlehome .kettle config] + if {[file exists $dotfile] && + [file isfile $dotfile] && + [file readable $dotfile]} { + ::kettle io trace {Loading dotfile $dotfile ...} + set args [list {*}[::kettle path cat $dotfile] {*}$args] + } } } @@ -1663,6 +1673,6 @@ namespace eval punk::mix::cli { ## Ready package provide punk::mix::cli [namespace eval punk::mix::cli { variable version - set version 0.6.0 + set version 0.6.1 }] return