| Ticket UUID: | 582506 | ||
| Title: | imported cmds do not fire exec traces | ||
| Type: | Bug | Created on: | 2002-07-16 21:28:05 |
| Submitter: | dgp | Assigned to: | dgp |
| Subsystem: | 21. [namespace] | Severity: | |
| Priority: | 7 High | Last modified: | 2008-12-07 22:28:15 |
| Status: | Open | Closed by: | |
| Resolution: | None | Closed on: | |
| Version: | obsolete: 8.4b2 | ||
| Description: | ||||
% info patch
8.4b2
% namespace eval export {
namespace export foo
proc foo {} {}
}
% trace add execution export::foo enter {puts FOO ;# }
% namespace eval import namespace import ::export::foo
% export::foo
FOO
% import::foo
%
The problem arises apparently because
InvokeImportedCmd() directly runs the
command procedure, rather than calling
on TclEvalObjvInternal() where the
execution tracing is handled.
If TclEvalObjvInternal() has become the
one central place where command
evaluation occurs, then imported
commands should go through there as well.
| ||||
| User Comments: | ||||
dgp added on 2002-07-17 04:47:46:
Logged In: YES
user_id=80530
The inverse is also a problem:
% namespace eval export {
namespace export foo
proc foo {} {}
}
% namespace eval import namespace import ::export::foo
% trace add execution import::foo enter {put FOO ;#}
% import::foo
FOO
% export::foo
%
As discussed on TCLCORE, execution traces should
attach to the command procedure (or equivalently,
the original name ([namespace origin]) of a command),
while rename and delete traces attach to the name only.
msofer added on 2004-07-13 22:05:02:
Logged In: YES user_id=148712 Invocation of hidden commands should also go through TEOVI. Actually, every command invocation should go thorugh TEOVI. msofer added on 2004-10-18 23:27:24:
Logged In: YES user_id=148712 Reported again as Bug #1049413 martinlemburg added on 2007-04-02 20:57:04:
Logged In: YES user_id=802134 Originator: NO I got in touch with this problem while using a selfmade command logging and runtime measurement package and found it very disattracting, that I have to care about this. Since the problem is still alive, even in tcl 8.5a4, ... is there a chance to help to get rid of this, to close this bug in the next 8.4 and 8.5 releases? dgp added on 2008-07-14 23:32:34:
Logged In: YES user_id=80530 Originator: YES If the massive NRE/drop an asteroid on TEOVI changes haven't fixed this one, perhaps they should? msofer added on 2008-07-21 23:29:53:
Logged In: YES user_id=148712 Originator: NO Fix committed to HEAD (I think). Please verify and add tests. No simple backport is possible, implementation uses NRE. dgp added on 2008-12-07 22:28:15:
this bug is fixed. Report is still open only as a reminder to supply missing tests. Missing tests isn't a blocker for 8.6b1 | ||||
