Artifacts Associated With Ticket 1590790
Ticket change [abfbb4dee3] (rid 101213) by msofer on 2006-11-05 12:32:54:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
The idiom [uplevel 1 [info level 0]] fails to call the currently executing proc in some corner cases [Bug 1590483]. Note that this can be fixed by letteing [interp alias] use fully qualified names. Should TIP 283 pass, the idiom breakage will be more widespread: it will not work at all for procs implementing ensemble subcommands, except in the rarest of occasions: the ensemble command is called from within the ensemble's namespace, or from a namespace that has the ensemble's in its resolution path (and is not shadowed). The attached patch provides a new [info call] subcommand that functions like [info level]. The difference between the two is that, when a command is rewritten prior to invocation (by an alias or ensemble), [info level n] returns the fully rewritten command (as invoked in the core), whereas [info call n] returns the original command as present in the source, after substitutions but before rewrites (as called by the user). This is useful for two reasons: - to provide a way to call the currently executing proc again, using [uplevel 1 [info call 0]] - to provide a way for procs to produce meaningful error reports that refer to what the user wrote
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "msofer"
- subsystem initialized to: "17. Commands I-L"
- title initialized to: "new [info call] command"
- type initialized to: "RFE"
Add attachment "call.patch" [6323ae7cdd] (rid 92524) by msofer on 2006-11-05 19:32:54.
Ticket change [b26bd206ee] (rid 98328) by msofer on 2006-11-05 19:32:54:
- icomment:
File Added - 201456: call.patch
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [983ebd670f] (rid 110574) by dkf on 2006-11-06 03:38:29:
- icomment:
Logged In: YES user_id=79902 One adjustment is that I'd like to make [info level $n] return the fully qualified version of the first command word, but arrange so that the determining of the first word only happens when [info level $n] is called, and not (necessarily) during the call. This postpones computing the FQN of the command until the instant it is actually needed. I'm not 100% sure this is a good idea in the presence of renamed and deleted commands though. :-\
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [e143bef142] (rid 87419) by msofer on 2006-11-07 20:40:47:
- icomment:
Logged In: YES user_id=148712 This does not really need a C api in order for all commands to produce error messages that refer to the actual input: Tcl_WrongNumArgs is an example of how to do that, using ensemble's rewrite and not [info call] directly.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [ca93ad2f96] (rid 95376) by dkf on 2006-11-07 21:24:43:
- icomment:
Logged In: YES user_id=79902 The problem is that some procedure authors (e.g. the author of clock.tcl) insist on trying to do all that themselves. Alas, we need a way to accommodate them (and to bear in mind that they're working against their best interests).
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d957867018] (rid 107595) by msofer on 2006-11-07 22:28:26:
- icomment:
Logged In: YES user_id=148712 Doh - the available C api is private (fields in ekeko), so the issue of a C api to use the rewrite engine is there.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment: