#not loaded - determine what version would be provided, without loading it:
#an unsatisfiable require triggers the package unknown scan (registering ifneeded
#scripts) then fails before any load (0.5.1 dev modules are alpha - below 999999).
#scripts) then fails before any load (0.6.0 dev modules are alpha - below 999999).
catch {package require punk::repl 999999}
set available [package versions punk::repl]
if {[llength $available]} {
@ -2519,7 +2519,7 @@ namespace eval punk::lib {
#for each of the above strings we should get a command recognised for the 'puts e*' items as well as the 'list' item, but not for the 'puts n' items since they are within curly braces and not subject to command substitution.
#manual args (simple positional signature) - see PUNKARGS documentation above
#consider 'list [puts a]$v(x,[puts b])[puts c]'
# the command substitutions are [puts a], [puts b] and [puts c]
#The order of evaluation is [puts a] then [puts b] then [puts c] but [puts b] is within the variable array syntax and so parses differently to the other two command substitutions.
@ -3680,7 +3792,7 @@ namespace eval punk::lib {
if {$nscontext eq ""} {
set nscontext [uplevel 1 {namespace current}]
}
puts stderr "------------tclword_to_scriptlist called with string: $string nscontext: $nscontext------------"
#puts stderr "------------tclword_to_scriptlist called with string: $string nscontext: $nscontext------------"
#analyse a string that will undergo command substitution to determine the list of commands that will be substituted into the string.
#e.g for "a string with [puts hello] and [puts world]" we would return a list of 2 items, each being a list of the command and its arguments, e.g {puts hello} and {puts world}
#we need to do a full parse of the string to determine which square brackets are actually command substitutions that need to be analysed for complexity, and which are just literal characters within the string.
@ -3697,11 +3809,11 @@ namespace eval punk::lib {
set scriptlist [list]
if {![catch {package require parser}]} {
#use tclparser library if available
if {[punk::lib::tclparser_prefer] eq "c"} {
#tclparser c library (preferred where present - performance)
set parseinfo [::parse command $boguscmdline {0 end}]
} else {
puts stderr "tclparser library not available - using fallback tcl parser which may be less accurate - review"
#punk::tclparser pure-Tcl engine (G-070) - parity-tested against the c library
set parseinfo [::punk::lib::tclparser_tcl command $boguscmdline {0 end}]
set cmdstringfull [parse getstring $boguscmdline $pos_bytes] ;#this must be used instead of string range to correctly handle any multibyte characters in the original string
@ -3796,7 +3908,7 @@ namespace eval punk::lib {
} elseif {[lindex $varsubnode 0] eq "variable"} {
set pos_bytes [lindex $varsubnode 1]
set varstringfull [parse getstring $boguscmdline $pos_bytes]
set antidir [list "#*" "_build" "_aside" ".git" ".fossil*"] ;#exact or glob patterns for folders (at any level) we don't want to search in or copy.
set antidir [list "#*" "_build" "_mint" "_bake" "_aside" ".git" ".fossil*"] ;#exact or glob patterns for folders (at any level) we don't want to search in or copy.
#use -base $buildfolder so that -directory is included in the archive - the modpod stub relies on this - and extraction would be potentially messy otherwise
#use -base $mintfolder so that -directory is included in the archive - the modpod stub relies on this - and extraction would be potentially messy otherwise
#put in an archive-level comment to aid in debugging
lappend warnings "WARNING: ${label}source project at $fossilroot has uncommitted fossil changes${scopedesc} ([llength $flines] file(s)) - artifacts built from a dirty tree have no committed provenance"
lappend warnings "WARNING: ${label}source project at $fossilroot has uncommitted fossil changes${scopedesc} ([llength $flines] file(s)) - artifacts produced from a dirty tree have no committed provenance"
lappend warnings "WARNING: ${label}could not determine git state of source project at $gitroot ($errM)"
} elseif {$gchanges ne ""} {
lappend warnings "WARNING: ${label}source project at $gitroot has uncommitted git changes${scopedesc} ([llength [split $gchanges \n]] file(s)) - artifacts built from a dirty tree have no committed provenance"
lappend warnings "WARNING: ${label}source project at $gitroot has uncommitted git changes${scopedesc} ([llength [split $gchanges \n]] file(s)) - artifacts produced from a dirty tree have no committed provenance"