Artifacts Associated With Ticket 1047286
Ticket change [a844be23da] (rid 98952) by dgp on 2004-10-14 19:53:02:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
When command delete traces fire, the command is supposed to still be there (even though you cannot stop its deletion). Like so: % proc callback {old - -} { puts "$old exists: [namespace which $old]" } % proc bar {} {} % trace add command bar delete callback % rename bar {} ::bar exists: ::bar However TclTeardownNamespace deletes access to commands before deleting the commands (and thus firing their delete traces). See: % namespace eval foo {proc bar {} {}} % trace add command foo::bar delete callback % namespace delete foo ::foo::bar exists: unknown command "::foo::bar" Some re-ordering in TTN() is needed. - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "21. [namespace]"
- title initialized to:
[namespace delete]: command delete traces: cmd already gone
- type initialized to: "Bug"
Ticket change [9206969d00] (rid 120712) by dgp on 2005-07-06 04:32:04:
- icomment:
Logged In: YES user_id=80530 Attached patch is a simple reordering of TclTeardownNamespace that corrects the reported problem and passes the test suite. Needs further review.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [590372de6f] (rid 117899) by dgp on 2005-07-06 04:32:05:
- icomment:
File Added - 140970: 1047286.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1047286.patch" [8a03e9e069] (rid 127318) by dgp on 2005-07-06 04:32:05.
Ticket change [646f9af440] (rid 92771) by dgp on 2005-07-06 04:52:17:
- icomment:
Logged In: YES user_id=80530 corresponding patch for 8.4
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1047286-84.patch" [c5c231856a] (rid 121645) by dgp on 2005-07-06 04:52:18.
Ticket change [f48cc9f0ff] (rid 129941) by dgp on 2005-07-06 04:52:18:
- icomment:
File Added - 140972: 1047286-84.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [01791e0c89] (rid 119492) by msofer on 2005-07-26 23:06:46:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=148712 Patches look good. Is it possible that some code in the wild might be relying on this behaviour (or using ad-hoc workarounds that this could break)? I'm not sure if I'd risk fixing the 8.4 branch.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [7d4ab0b81c] (rid 97218) by dgp on 2005-07-26 23:24:40:
- closedate changed to: "2005-07-26T16:24:40"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 [12:07]dgpI don't think that's a problem. [12:08]dgpcommand traces first arrived in Tcl 8.4, so there's not going to be any ancient code involved. [12:08]dgpand the 8.4.x patch releases are supposed to be for fixing the 8.4 bugs. patches committed. Added a test based on the example in the report.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
Ticket change [b8b0a01a02] (rid 129007) by msofer on 2005-10-31 06:31:45:
- closedate changed to: "2005-10-30T23:31:45"
- closer changed to: "msofer"
- icomment:
Logged In: YES user_id=148712 Please note that the behaviour for delete traces on variables is spec'ed differently: the variable is supposed not to exist while the delete trace fires - see Bug #1338280 Is there some deep reason for this difference? I can't find a related tip (tip62 mentions that "Tcl8.4 has already added support for tracing rename or delete operations on Tcl commands").
- login: "msofer"
- mimetype: "text/plain"
- status changed to: "Pending"
- username: "msofer"
Ticket change [b959b0905a] (rid 129124) by msofer on 2005-11-14 08:08:01:
- icomment:
Logged In: YES user_id=148712 This bug is not 100% fixed: witness the test namespace-7.4. There seems to be an inconsistency here: during the call to [namespace delete], the namespace is supposedly not resolvable anymore (according to the man page). This seems to disagree violently with the expectations in this bug report. The current implementation insures unresolvability if the call to [ns delete] occurs when the namespace is not in the call stack (ie, activationCount==0) [that it does only in this case may be an independent bug]. Namespace-7.4 fails not because the command does not exist, but because it can not be resolved by name; I suppose that if it is imported to another namespace, it does work when resolved there. Not sure what the correct behaviour might be. I tend to prefer that the command not be resolvable during a delete trace triggered by the namespace deletion - because the namespace itself is not resolvable.
- login: "msofer"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Open"
- username: "msofer"
- icomment:
Ticket change [432c753aae] (rid 116503) by msofer on 2005-11-14 08:12:08:
- icomment:
Logged In: YES user_id=148712 Rats - forget about namespace-7.4 (completely unrelated, looking in a buggy sandbox. Sorry.) Comments still stand on their own merit.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ee36a08325] (rid 104043) by msofer on 2005-11-14 22:03:33:
- icomment:
Logged In: YES user_id=148712 To illustrate the difference between 'ns in stack' and 'ns not in stack': % info patch 8.5a4 % namespace eval foo {proc bar {} {}} % trace add command foo::bar delete callback % namespace delete foo ::foo::bar exists: ::foo::bar % % namespace eval foo {proc bar {} {}} % trace add command foo::bar delete callback % namespace eval foo {namespace delete [namespace current]} ::foo::bar exists: - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [75450a7a44] (rid 105364) by dgp on 2005-11-14 23:53:02:
- priority changed to: "7 High"
Ticket change [74359a36a6] (rid 105169) by dgp on 2005-11-14 23:53:03:
- icomment:
Logged In: YES user_id=80530 I don't like that at all. At least before I had the choice of a successful [namespace which] or an error. A [namespace which] that apparently succeeds but returns an empty string is unsettling. How do we fix it?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [7775c279a1] (rid 89779) by dgp on 2005-11-15 01:18:16:
- icomment:
Logged In: YES user_id=80530 sorry, mis-recalled the docs for [namespace which]. Empty string return is correct for non-existent command.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8b421b86c5] (rid 127531) by msofer on 2005-11-19 06:47:24:
- foundin changed to: "obsolete: 8.5a4"
- icomment:
Logged In: YES user_id=148712 Added test trace-34.5 to illustrate the the role of "ns in callStack" in the ns's visibility during deletion traces.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [9060d320c3] (rid 120442) by dgp on 2006-03-10 12:09:10:
- icomment:
Logged In: YES user_id=80530 Looks like we overlooked closing this one.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"
- icomment:
Ticket change [abece98081] (rid 101202) by dgp on 2006-03-10 12:09:11:
- closedate changed to: "2006-03-10T05:09:11"
- closer changed to: "dgp"