|
2004-09-10
| ||
| 00:01 | • Closed ticket [582533ffff]: rename traces follow renamed command plus 7 othe... artifact: 967f0332d4 user: dgp | |
|
2004-08-22
| ||
| 05:20 | • Ticket [582533ffff]: 4 changes artifact: f6db4fedf8 user: dgp | |
| 01:23 | • Ticket [582533ffff]: 4 changes artifact: a4f371c2df user: duquette | |
|
2003-06-26
| ||
| 22:46 | • Ticket [582533ffff]: 1 change artifact: 568775513e user: dgp | |
| 17:29 | • Ticket [582533ffff]: 1 change artifact: fd41baa90d user: dkf | |
|
2002-07-16
| ||
| 22:43 | • New ticket [582533ffff]. artifact: 9a8d36cc0a user: dgp | |
rename traces follow renamed command
Closed / Invalid582533ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 22 years ago
Descriptionplain2002-07-16 22:43:58
As discussed on TCLCORE, execution traces
should attach to the commands themselves,
and rename and delete traces should attach
to command names. However:
% proc print args {puts $args}
% proc foo {} {}
% trace add command foo rename print
% rename foo bar
foo bar rename
% rename bar soom
bar soom rename
Clearly the "rename" trace attached to
the name "foo" was transferred to the
name "bar".
If that's not a bug, then we really need to
beef up the docs to explain just what
rules these command and command name
traces follow.
This is all related to Bug 565823 as well
as it indicates the lack of a clearly defined
and documented distinction between
commands and command names.
dkf Ticket [582533ffff]: 1 change
[History diff]2003-06-26 17:29:46
dgp Ticket [582533ffff]: 1 change
[History diff]2003-06-26 22:46:56
duquetteplain2004-08-22 01:23:05
Logged In: YES user_id=372859 I strongly disagree that rename and delete traces should attach to command names rather than commands. Snit uses a rename/delete trace to detect when a Snit instance is renamed or deleted...and if the Snit instance is renamed, the trace remains attached to the Snit instance under its new name, as it should. If myobj is the name of a Snit instance, then % mysnittype myobj % rename myobj hisobj % rename hisobj "" destroys the instance, as it should. In any event, the current behavior has been in place for the entire lifespan of Tcl 8.4. If you change it, it will break Snit badly, and I can't imagine that Snit's the only package affected. If the other behavior is really necessary, add it as % trace add commandname foo ....
dgpplain2004-08-22 05:20:14
Logged In: YES user_id=80530 Very well. Snit is important, and snit depends on this, so I'm inclined to mark this "Won't Fix". Before I do, I hope you don't mind revisiting the issue with me though? Maybe we'll find a consistent way out. Looking back at this TCLCORE message... http://sf.net/mailarchive/message.php?msg_id=1659085 Is either of Model I or Model II described there compatible with the needs of Snit? (Based on your comments so far, I think I understand Model I won't work for you?) That message isn't a model of clarity, so if it helps to just state what Snit needs, that's fine too.
dgpplain2004-09-10 00:01:29
Logged In: YES user_id=80530 Withdrawing this.
Log in (anonymous is fine) to add a comment.