Artifacts Associated With Ticket 572889ffffffffff
Ticket change [8bbc620c99] (rid 127623) by dgp on 2002-06-23 21:43:28:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% set a(foo) 1 1 % trace variable a r {puts a ;#} % set a(foo) a 1 % upvar 0 a(foo) baz % set baz 1 I would like to see the trace fire when I read from baz. - foundin initialized to: "obsolete: 8.4a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "07. Variables"
- title initialized to: "upvar links do not fire array read trace"
- type initialized to: "RFE"
Ticket change [cac83b6822] (rid 95421) by msofer on 2002-06-24 23:56:38:
- icomment:
Logged In: YES user_id=148712 upvar.n dixit: "If otherVar refers to an element of an array, then variable traces set for the entire array will not be invoked when myVar is accessed (but traces on the particular element will still be invoked). In particular, if the array is env, then changes made to myVar will not be passed to subprocesses correctly." So, is this a bug or a FR? Does it need a TIP?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [d018330765] (rid 113106) by dgp on 2002-06-25 00:09:53:
- assignee changed to: "nobody"
- foundin changed to: "None"
- icomment:
Logged In: YES user_id=80530 Thanks. If this is to change, it would be a FR/TIP. Don't feel strong enough about it to do that now, but I'll shift this over the FR tracker in case anyone else wants to pick it up. Note to self: read *all* relevant man pages before filing bugs... Workaround seems to be to set traces on both the source and target of the [upvar]. Works fine, then, if annoying.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "None"
- username: "dgp"
Ticket change [714a556fe5] (rid 100646) by dgp on 2003-04-18 13:28:07:
- assignee changed to: "jenglish"
- icomment:
Logged In: YES user_id=80530 Joe, you were asking about this on the chat.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [f2c3ecc074] (rid 109611) by dkf on 2003-06-26 17:35:45:
- subsystem changed to: "46. Traces"
Ticket change [c7b147cbee] (rid 121978) by dgp on 2003-06-26 23:07:55:
- assignee changed to: "dgp"
Ticket change [f9de0de8db] (rid 261541) by serhiy.storchaka on 2026-11-13 11:18:45:
- closedate changed to: "2461357.9713335303"
- closer changed to: "serhiy.storchaka"
- icomment:
Implemented by TIP 634 in Tcl 9.0: traces on the whole array now fire when the array element is accessed through an upvar link, and the upvar manual page was updated accordingly.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [ac4527d245] (rid 261586) by dgp on 2026-11-13 16:15:31:
- closedate changed to: "2461358.1774525926"
- closer changed to: "dgp"
- comment changed to:
% set a(foo) 1 1 % trace variable a r {puts a ;#} % set a(foo) a 1 % upvar 0 a(foo) baz % set baz 1 I would like to see the trace fire when I read from baz. - icomment:
Please note there is code in the tcltest package that is a workaround of the (mis)feature reported in this ticket. Someone with the time might examine whether this workaround can be phased out now.
- login: "dgp"
- mimetype: "text/plain"
- severity changed to: "Minor"
Ticket change [4c50d4e86f] (rid 261594) by serhiy.storchaka on 2026-11-13 17:51:03:
- icomment:
The workaround is the list of option variables in tcltest, which each get their own auto-configure read trace because a trace on the Option array did not fire through their upvar links. On Tcl 9.0 and later the trace on Option is enough, but tcltest still runs on Tcl 8.6 (and 8.5), where the workaround is still needed. Proposed change in branch [/timeline?r=tcltest-array-trace-upvar|tcltest-array-trace-upvar]: the per-variable traces are only set before Tcl 9.0.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [7424ffb02d] (rid 261726) by jan.nijtmans on 2026-11-15 14:14:38:
- closedate changed to: "2461360.0934970947"
- closer changed to: "jan.nijtmans"
- icomment:
Branch branch tcltest-array-trace-upvar is now merged to trunk, core-9-0-branch and core-8-6-branch. Good idea (without any ill-effects)
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"