Artifacts Associated With Ticket 0363f0146cb1f0fa
Ticket change [521a6ff7e1] (rid 146177) by dgp on 2016-04-04 20:12:54:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Little used corner of Tcl apparently never made aware of namespaces, or any other way distinct variable names can refer to the same variable. % array anymore tcl_platform [array startsearch ::tcl_platform] search identifier "s-1-::tcl_platform" isn't for variable "tcl_platform"
- foundin initialized to: "all"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "07. Variables"
- title initialized to:
array search commands fail to recognize all names for variable
- type initialized to: "Bug"
Ticket change [5067c47848] (rid 146239) by anonymous on 2016-04-07 23:22:26:
- comment changed to:
Little used corner of Tcl apparently never made aware of namespaces, or any other way distinct variable names can refer to the same variable. % array anymore tcl_platform [array startsearch ::tcl_platform] search identifier "s-1-::tcl_platform" isn't for variable "tcl_platform"
- icomment:
The suggested command returns that error, but this other command returns 1: puts [array anymore ::tcl_platform [array startsearch ::tcl_platform]]
- login: "anonymous"
- mimetype: "text/plain"
- comment changed to:
Ticket change [c999e4dca6] (rid 148148) by dgp on 2016-07-19 17:17:27:
- icomment:
% array set foo {1 2 3 4 5 6} % set as1 [array startsearch foo] s-1-foo % namespace eval n { variable foo array set foo {a b c d e f} set ::as2 [array startsearch foo] } s-1-foo At this point $::as1 and $::as2 hold identical string values. They are interchangeable as identifiers of both searches, which implies they are not unique identifiers of either search. - login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [79242fcac9] (rid 148155) by dgp on 2016-07-19 19:55:39:
- assignee changed to: "dgp"
- closedate changed to: "2457589.33031557"
- closer changed to: "dgp"
- icomment:
Fixed the original issue on trunk (8.7a). Left the second issue alone and made no change to the 8.6 and lower branches out of (too much?) concern for not disrupting things.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [8707c32219] (rid 148233) by mistachkin on 2016-07-22 23:27:55:
- closedate changed to: "2457592.47772372"
- closer changed to: "mistachkin"
- icomment:
I don't understand why the variable name is part of the returned array search identifier. I'm guessing this is unspecified behavior? Is this required for script compatibility by anything that we know of?
- login: "mistachkin"
- mimetype: "text/plain"
Ticket change [09ee2ae5ad] (rid 148257) by dgp on 2016-07-25 17:18:34:
- closedate changed to: "2457595.22122976"
- closer changed to: "dgp"
- icomment:
The code was improperly using the varname embedded in the search ID to compare the varname argument of the invoked command and report that the wrong variable was used when they failed to match. As this bug report shows, that was done at best improperly in any environment where the same variable can have many names. Back when the array search command collection was invented, that was at least a much rarer, if not impossible circumstance, with no namespaces to bother us. Clearly, it would be a sufficient interface revision to pass in the search-ID only. Then there could be no mismatch to worry about. In that revision, we'd need only for the search ID to be unique among the active searches in the interp. (To detect probable bugs, uniqueness over interp lifetime would be even better.) The one specific "user" that needs compatibility maintained is the set of tests in set-old.test. Could have changed them too, but I've taken them as representative of other code out there not wanting its applecart turned over -- especially not in a patch release.
- login: "dgp"
- mimetype: "text/plain"