Tcl list-related 2.3.4 -> 2.3.5 changes?

René J.V. Bertin rjvbertin at gmail.com
Fri Dec 2 16:45:59 CET 2016


Hi,

I'm trying to understand a regression that seems coupled to the 2.3.4 -> 2.3.5 upgrade (or more exactly, "master just after 2.3.4" -> "master 25 commits after 2.3.5").

I had

{{{
proc macports::normalize { filename } {
    set nprefix [file dirname [file normalize "${macports::prefix}/foo"]]
    return [string map {${nprefix} ${macports::prefix}} [file normalize $filename]]
}
}}}

which now must be

{{{
proc macports::normalize { filename } {
    set prefmap [list [file dirname [file normalize "${macports::prefix}/foo"]] ${macports::prefix}]
    return [string map ${prefmap} [file normalize $filename]]
}
}}}

in order to have any effect.

The contents of nprefix and macports::prefix haven't changed, but it's as if the former form no longer evaluates those variables in the map list.

Is this related to a change (update, bug-fix) in the underlying Tcl library and/or should my original function never have worked? I did notice that the list function has started popping up in a number of locations of the kind where I wasn't used to seeing it.

Thanks,
R.


More information about the macports-dev mailing list