Skip to content
Tcl Source Code History Of Ticket 1436096
Login

History Of Ticket 1436096

Artifacts Associated With Ticket 1436096

  1. Ticket change [c231e97d59] (rid 111452) by dgp on 2006-02-21 18:39:39:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      
      Not completely confident about
      this one...
      
      It appears that for ensemble
      subcommand dispatch to work
      correctly, the command name
      needs to be fully qualified.
      Implementation of the
      [namespace ensemble] command
      appears to go to significant
      effort to store only fully
      qualified commands.  (patchedDict
      and all that).
      
      However, the public routine
      Tcl_SetEnsembleMappingDict()
      permits registration of a
      dictionary with unqulified cmds
      in it.  I think this will break
      subcommand resolution, due to
      the used of TCL_EVAL_INVOKE.
      
      Feel free to close this invalid
      if I'm just missing something.
      
      (Is the *real* fix here to factor
      TCL_EVAL_INVOKE into useful
      subfunctions?  Separate flags for
      suppressing ::errorInfo appends
      and for command resolution in the
      global namespace?)
      
      
      
      
    4. foundin initialized to: "obsolete: 8.5a4"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "21. [namespace]"
    10. title initialized to: "unqualified cmd names in ensemble dicts"
    11. type initialized to: "Bug"
  2. Ticket change [4ede3189f6] (rid 125718) by dkf on 2006-04-17 22:33:26:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Other kinds of command resolution can be implemented as
      commands, you know. For example, fully unqualified:
      
        proc ::uqeval args { uplevel 1 $args }
        dict set map bar [list ::uqeval bar]
        namespace ensemble configure foo -map $map
      
      Given that, solving this isn't a high priority right now.
      (The alternative is to have some mechanism for specifying
      what NS to use when resolving a command, but I'm not quite
      sure how to make that all tie together.)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. priority changed to: "4"
    5. username: "dkf"
  3. Ticket change [25d4a4ec06] (rid 88232) by dgp on 2006-04-17 22:41:20:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Yes, my point was to question
      whether Tcl_SetEnsembleMappingDict()
      ought to be public, or if public,
      whether it ought to reject
      non-fully-qualified subcommand
      handlers.  As you point out, if
      we did add such a constraint to
      the interface, coders could still
      achieve whatever resolution rules
      they want.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [a6e2ba4597] (rid 98687) by msofer on 2006-10-17 02:19:23:

    1. assignee changed to: "msofer"
    2. icomment:
      Logged In: YES 
      user_id=148712
      
      Taking over: possible resolution with TIP 283.
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  5. Ticket change [5b905c2929] (rid 118350) by dgp on 2007-09-05 23:22:50:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      This looks like something
      to be sure we have resolved
      for beta, since fixing it
      might involve mods to the
      public API.
      
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [3f8f78b4e1] (rid 121479) by dgp on 2007-10-31 23:38:53:

    1. priority changed to: "9 Immediate"
  7. Ticket change [aa425272ae] (rid 99297) by msofer on 2007-11-01 00:12:03:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=148712
      Originator: NO
      
      Agreed, but I do not know how to fix this without breaking other stuff. Specifically, the behaviour caused by TCL_EVAL_INVOKE where a command name is resolved in a special context, but the command is then invoked from the caller's context, subtly breaks [uplevel] expectations (and [unknown]). In particular
        uplevel 1 [info level 0]
      may fail to call the current proc - as the lookup will now proceed in the caller's context and not in the special context required by TCL_EVAL_INVOKE. Consider
        % proc a args {namespace eval ::a $args}
        % a proc tell args {info level 0}
        % a namespace export tell           
        % a namespace ensemble create -command ::foo
        ::foo
        % foo tell
        ::a::tell
      
      If the result were 'tell' the effect above would occur.
      
      This behaviour is already problematic in [interp alias], in a milder form: the lookup is done in a previsible context (global). 
      
      
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  8. Ticket change [99424ed4c7] (rid 110759) by dkf on 2007-11-01 04:36:45:

    1. icomment:
      Logged In: YES 
      user_id=79902
      Originator: NO
      
      Hmm, then we've got to just pick which bits to keep.
      
      I reckon we must preserve the fact that [uplevel 1 $script] runs in the context of the caller of the overall ensemble. Far more scripts are dependent on that than on [info level 0] or on [unknown]'s autoloading these days - lazy package loading is bad for other reasons too - and without preserving that chaos will reign when you wrap a command that really relies on that. (This is one of the things that is wrong with xotcl.)
      
      We can also make [info level 0] say how to call the command again so that [uplevel 1 [info level 0]] repeats the current command, called in the same way. But we can't keep all that without breaking [unknown]. We get to pick: square or circle, but not both.
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [23ff1e860d] (rid 131029) by dgp on 2007-11-02 00:55:19:

    1. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      I'm missing something then?
      
      Why wouldn't a Tcl_SetEnsembleMappingDict()
      that either rejects unqualified names,
      or qualifies them before storing take
      care of this issue?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  10. Add attachment "1436096.patch" [c98edd3f0f] (rid 122306) by dgp on 2007-11-28 23:46:04.

  11. Ticket change [6ab9684705] (rid 128201) by dgp on 2007-11-28 23:46:04:

    1. icomment:
      
      
      File Added - 256457: 1436096.patch
      
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      Here's a patch
      
      File Added: 1436096.patch
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  12. Ticket change [ab6c026f61] (rid 101110) by dgp on 2007-11-28 23:50:29:

    1. closedate changed to: "2007-11-28T16:50:29"
    2. closer changed to: "dgp"
    3. icomment:
      Logged In: YES 
      user_id=80530
      Originator: YES
      
      
      committed for 8.5.0
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "dgp"