diff --git a/src/modules/punk/cap/handlers/templates-999999.0a1.0.tm b/src/modules/punk/cap/handlers/templates-999999.0a1.0.tm index 992c2923..3ac039f2 100644 --- a/src/modules/punk/cap/handlers/templates-999999.0a1.0.tm +++ b/src/modules/punk/cap/handlers/templates-999999.0a1.0.tm @@ -172,7 +172,7 @@ namespace eval punk::cap::handlers::templates { return 0 } set normpath [file normalize $path] - if {!file exists $normpath} { + if {![file exists $normpath]} { puts stderr "punk::cap::handlers::templates::capsystem::pkg_register WARNING - package '$pkg' is attempting to register with punk::cap as a provider of '$capname' capability but provided a path '$path' which doesn't seem to exist" return 0 } @@ -197,7 +197,7 @@ namespace eval punk::cap::handlers::templates { if {$capname ni $::punk::cap::handlers::templates::handled_caps} { lappend ::punk::cap::handlers::templates::handled_caps $capname } - if {![info exists provider_info] || $extended_capdict ni [dict get $provider_info $pkg]} { + if {![info exists provider_info] || ![dict exists $provider_info $pkg] || $extended_capdict ni [dict get $provider_info $pkg]} { #this checks for duplicates from the same provider - but not if other providers already added the path #review - dict lappend provider_info $pkg $extended_capdict diff --git a/src/modules/punk/cap/handlers/templates-buildversion.txt b/src/modules/punk/cap/handlers/templates-buildversion.txt index f47d01c8..b5fe9372 100644 --- a/src/modules/punk/cap/handlers/templates-buildversion.txt +++ b/src/modules/punk/cap/handlers/templates-buildversion.txt @@ -1,3 +1,5 @@ -0.1.0 +0.1.1 #First line must be a semantic version number #all other lines are ignored. +#0.1.1 - fix: pkg_register 'absolute' pathtype branch had a non-braced expr 'if {!file exists $normpath}' which raised an expr syntax error on any absolute-pathtype provider registration; now correctly tests ![file exists $normpath] +#0.1.1 - fix: pkg_register duplicate-registration guard did 'dict get $provider_info $pkg' without a dict exists check, erroring for any second provider package registering the same capability diff --git a/src/modules/punk/mix/base-0.1.tm b/src/modules/punk/mix/base-0.1.1.tm similarity index 98% rename from src/modules/punk/mix/base-0.1.tm rename to src/modules/punk/mix/base-0.1.1.tm index 81496c06..25e73048 100644 --- a/src/modules/punk/mix/base-0.1.tm +++ b/src/modules/punk/mix/base-0.1.1.tm @@ -1,7 +1,9 @@ package provide punk::mix::base [namespace eval punk::mix::base { variable version - set version 0.1 + set version 0.1.1 }] +#version history (manually versioned module - real version is the filename/provide value) +#0.1.1 - fix: get_template_basefolders no-handler warning used 'put' instead of 'puts'; missing-handler path now warns and returns an empty dict instead of erroring on an unset variable package require punk::path package require punk::lib ;#format_number etc @@ -393,7 +395,8 @@ namespace eval punk::mix::base { if {[punk::cap::capability_has_handler punk.templates]} { set template_folder_dict [punk::cap::call_handler punk.templates folders -startdir $startpath] } else { - put stderr "get_template_basefolders WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + puts stderr "get_template_basefolders WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + set template_folder_dict [dict create] } #don't sort - order in which encountered defines the precedence - with later overriding earlier diff --git a/src/modules/punk/mix/commandset/layout-999999.0a1.0.tm b/src/modules/punk/mix/commandset/layout-999999.0a1.0.tm index 4e54f8d5..a8c7a448 100644 --- a/src/modules/punk/mix/commandset/layout-999999.0a1.0.tm +++ b/src/modules/punk/mix/commandset/layout-999999.0a1.0.tm @@ -205,10 +205,11 @@ namespace eval punk::mix::commandset::layout { if {[punk::cap::capability_has_handler punk.templates]} { set ref_dict [punk::cap::call_handler punk.templates get_itemdict_projectlayoutrefs {*}$args] } else { - put stderr "commandset::layout::lib::layouts_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + puts stderr "commandset::layout::collection::references_as_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + set ref_dict [dict create] } return $ref_dict - } + } } namespace eval lib { proc layouts_dict {args} { @@ -216,10 +217,11 @@ namespace eval punk::mix::commandset::layout { if {[punk::cap::capability_has_handler punk.templates]} { set layout_dict [punk::cap::call_handler punk.templates get_itemdict_projectlayouts {*}$args] } else { - put stderr "commandset::layout::lib::layouts_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + puts stderr "commandset::layout::lib::layouts_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + set layout_dict [dict create] } return $layout_dict - } + } proc layout_all_files {layout} { #todo - allow versionless layout name to pick highest version found diff --git a/src/modules/punk/mix/commandset/layout-buildversion.txt b/src/modules/punk/mix/commandset/layout-buildversion.txt index f47d01c8..d97a9d8a 100644 --- a/src/modules/punk/mix/commandset/layout-buildversion.txt +++ b/src/modules/punk/mix/commandset/layout-buildversion.txt @@ -1,3 +1,4 @@ -0.1.0 +0.1.1 #First line must be a semantic version number #all other lines are ignored. +#0.1.1 - fix: no-handler warning paths in collection::references_as_dict and lib::layouts_dict used 'put' instead of 'puts' and then errored on an unset dict variable; they now warn correctly and return an empty dict. references_as_dict warning message no longer misattributes itself to layouts_dict. diff --git a/src/modules/punk/mix/commandset/module-999999.0a1.0.tm b/src/modules/punk/mix/commandset/module-999999.0a1.0.tm index 846d829c..d96bbb48 100644 --- a/src/modules/punk/mix/commandset/module-999999.0a1.0.tm +++ b/src/modules/punk/mix/commandset/module-999999.0a1.0.tm @@ -137,7 +137,8 @@ namespace eval punk::mix::commandset::module { if {[punk::cap::capability_has_handler punk.templates]} { set template_folder_dict [punk::cap::call_handler punk.templates get_itemdict_moduletemplates {*}$args] } else { - put stderr "get_template_basefolders WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + puts stderr "commandset::module::templates_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + set template_folder_dict [dict create] } } diff --git a/src/modules/punk/mix/commandset/module-buildversion.txt b/src/modules/punk/mix/commandset/module-buildversion.txt index f47d01c8..4e49fb57 100644 --- a/src/modules/punk/mix/commandset/module-buildversion.txt +++ b/src/modules/punk/mix/commandset/module-buildversion.txt @@ -1,3 +1,4 @@ -0.1.0 +0.1.1 #First line must be a semantic version number #all other lines are ignored. +#0.1.1 - fix: templates_dict no-handler warning path used 'put' instead of 'puts' and left the result variable unset; now warns correctly (attributed to templates_dict rather than get_template_basefolders) and returns an empty dict diff --git a/src/modules/punk/mix/commandset/project-999999.0a1.0.tm b/src/modules/punk/mix/commandset/project-999999.0a1.0.tm index 81a97f11..12e338f2 100644 --- a/src/modules/punk/mix/commandset/project-999999.0a1.0.tm +++ b/src/modules/punk/mix/commandset/project-999999.0a1.0.tm @@ -252,7 +252,7 @@ namespace eval punk::mix::commandset::project { if {[punk::cap::capability_has_handler punk.templates]} { set layout_dict [punk::cap::call_handler punk.templates get_itemdict_projectlayouts] } else { - put stderr "commandset::project::new WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide layout locations" + puts stderr "commandset::project::new WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide layout locations" return } if {[dict exists $layout_dict $opt_layout]} { diff --git a/src/modules/punk/mix/commandset/project-buildversion.txt b/src/modules/punk/mix/commandset/project-buildversion.txt index 33a8ca4d..193ba83a 100644 --- a/src/modules/punk/mix/commandset/project-buildversion.txt +++ b/src/modules/punk/mix/commandset/project-buildversion.txt @@ -1,6 +1,7 @@ -0.2.1 +0.2.2 #First line must be a semantic version number #all other lines are ignored. +#0.2.2 - fix: new's no-handler warning path used 'put' instead of 'puts' (raised invalid command name error instead of warning) #0.2.1 - fix: -layout now validated and normalized via tcl::prefix::match against documented layout choices, matching the PUNKARGS -choiceprefix default (true); previously the manual parser accepted arbitrary values with no validation #0.2.0 - updated punkcheck::install call sites to use -exclude-paths / -exclude-paths-core (replaced -antiglob-paths + -exclude-dirsegments) — call-site API change warrants minor bump #0.2.0 - updated call sites to use hyphenated flag names (-punkcheck-folder, -exclude-paths-core) diff --git a/src/modules/punk/mix/commandset/scriptwrap-999999.0a1.0.tm b/src/modules/punk/mix/commandset/scriptwrap-999999.0a1.0.tm index 64b50e55..592494ff 100644 --- a/src/modules/punk/mix/commandset/scriptwrap-999999.0a1.0.tm +++ b/src/modules/punk/mix/commandset/scriptwrap-999999.0a1.0.tm @@ -141,7 +141,7 @@ namespace eval punk::mix::commandset::scriptwrap { if {[punk::cap::capability_has_handler punk.templates]} { return [punk::cap::call_handler punk.templates get_itemdict_scriptappwrappers {*}$args] } else { - put stderr "commandset::scriptwrap::templates_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" + puts stderr "commandset::scriptwrap::templates_dict WARNING - no handler available for the 'punk.templates' capability - template providers will be unable to provide template locations" } return } diff --git a/src/modules/punk/mix/commandset/scriptwrap-buildversion.txt b/src/modules/punk/mix/commandset/scriptwrap-buildversion.txt index f47d01c8..f64b36d7 100644 --- a/src/modules/punk/mix/commandset/scriptwrap-buildversion.txt +++ b/src/modules/punk/mix/commandset/scriptwrap-buildversion.txt @@ -1,3 +1,4 @@ -0.1.0 +0.1.1 #First line must be a semantic version number #all other lines are ignored. +#0.1.1 - fix: templates_dict no-handler warning path used 'put' instead of 'puts' (raised invalid command name error instead of warning)