Artifacts Associated With Ticket 1017299
Ticket change [2d2752a550] (rid 119025) by dgp on 2004-08-27 00:42:36:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
% namespace eval one { namespace export foo proc foo {} {} } % namespace eval two { namespace export foo namespace import ::one::foo } % namespace eval three { namespace export foo namespace import ::two::foo } % namespace eval two namespace import -force ::three::foo % namespace origin two::foo ...leaves Tcl hung in an internal infinite loop. The import loop prevention check inside Tcl_Import only prevents "end-to-end" loops, not lesser cycles of reference. - foundin initialized to: "obsolete: 8.5a2"
- 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 import] loop not prevented"
- type initialized to: "Bug"
Ticket change [a23e571d2f] (rid 109853) by dgp on 2004-08-27 20:52:06:
- icomment:
Logged In: YES user_id=80530 In the spirit of "snapshot semantics" I think this bug can be fixed by not using import chains internally. Have each import refer directly to its origin.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [cd971a7569] (rid 95918) by dgp on 2004-08-27 21:27:31:
- icomment:
Logged In: YES user_id=80530 miguel points out that would change the following script behavior: % namespace eval a {namespace export *; proc a {} {puts hi}} % namespace eval b {namespace export *;namespace import ::a::a} % namespace eval c {namespace import ::b::a} % c::a hi % namespace eval b {proc a {} {puts lo}} % c::a lo % b::a lo % a::a hi From my perspective, that code just demonstrates that we have an "inconsistent [namespace import] model" (See Bug 565823). Do we implement snapshot semantics or not? But, it's probably unchangeable at this point. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [6835d34647] (rid 103020) by dgp on 2004-09-10 00:02:33:
- icomment:
File Added - 100907: 1017299.patch Logged In: YES user_id=80530 having looked into the internals quite a bit now, I think I had the wrong idea about "snapshot semantics". Appears that phrase is only intended to refer to export sets, not to the very definition of commands. Note another bug. Tcl_Import accepts as an argument the namespace to import into, and if that argument is NULL, uses the current namespace of the interp. When checking for import loops, the current namespace of the interp is checked, rather than the namespace to import into. Here's a patch for the bugs.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1017299.patch" [8fd5ce7b5a] (rid 120344) by dgp on 2004-09-10 00:02:33.
Ticket change [8a77350c90] (rid 127395) by dgp on 2004-09-10 00:13:34:
- assignee changed to: "dgp"
- closedate changed to: "2004-09-09T17:13:34"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 Patch committed to HEAD and 8-4-branch.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"