Browse Source

kettle tilde fix: punk::mix::cli 0.6.1 + vendored kettle app.tcl local patch (tcl9)

Tcl 9 removed tilde expansion: kettle_call's lib-mode 'file mkdir ~/.kettle'
created a literal ./~/.kettle dir in the cwd - littering every tcl9-driven
'dev project.new' target via the kettledoc step (found during the modpod
checkout structure refresh). Home is now resolved explicitly ([file home]
on 8.7+/9, native ~ expansion on 8.6); no resolvable home skips the
optional dotfile config; the mkdir is catch-guarded. Same-shape local patch
in src/vendorlib/kettle1/app.tcl (kettle's own dotfile read silently
ignored ~/.kettle/config under tcl9), comment-marked for
reapply-on-vendor-upgrade.

Verified by scratch-cwd repro: kit cli 0.6.0 creates ./~ (TILDEDIR=1),
working-tree 0.6.1 does not (TILDEDIR=0), real HOME/.kettle used.
Propagated bootsupport + vfscommon (modules cli-0.6.1, lib kettle1).
No bake in this commit - the tree carries unrelated in-flight work, so
kits keep the litter behaviour until the next bake. Project-version
bullet left to fold into the pending 0.48.0 CHANGELOG entry.

Claude-Session: https://claude.ai/code/session_0156PuejSCGjgeGb7jiABrDU
Assisted-by: harness=claude; primary-model=claude-fable-5; api-location=anthropic.com
master
Julian Noble 1 week ago
parent
commit
fbd6cd6a93
  1. 28
      src/bootsupport/modules/punk/mix/cli-0.6.1.tm
  2. 24
      src/modules/punk/mix/cli-999999.0a1.0.tm
  3. 3
      src/modules/punk/mix/cli-buildversion.txt
  4. 12
      src/vendorlib/kettle1/app.tcl
  5. 12
      src/vfs/_vfscommon.vfs/lib/kettle1/app.tcl
  6. 28
      src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.1.tm

28
src/bootsupport/modules/punk/mix/cli-0.6.0.tm → 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 <unspecified>
# @@ 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

24
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]
}
}
}

3
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 <srcdir>/_build -> <srcdir>/_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

12
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]} {

12
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]} {

28
src/vfs/_vfscommon.vfs/modules/punk/mix/cli-0.6.0.tm → 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 <unspecified>
# @@ 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
Loading…
Cancel
Save