Skip to content
Tcl Source Code History Of Ticket 36e5517a6850
Login

History Of Ticket 36e5517a6850

Artifacts Associated With Ticket 36e5517a6850

  1. Ticket change [efd9aa32c2] (rid 225509) by apnadkarni on 2024-05-03 06:50:25:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-markdown"
    4. comment initialized to:
      In 8.6
      
      ```
      % oo::class create C {method Private {} {}; method public {} {}}
      ::C
      % info class methods ::C
      public
      % info class methods ::C -private
      public Private
      ```
      
      The above works as documented as the `-private` option will return private methods **in addition to** public methods as stated in the manpage *If the -private flag is given, the list of methods will also include the private...* (note the "also").
      
      In Tcl 9, this is not the case
      
      ```
      % oo::class create C {method Private {} {}; method public {} {}}
      ::C
      % info class methods ::C
      public
      % info class methods ::C -private
      Private
      ```
      
      Note the `-private` option now returns only private methods. However, the documentation still seems to match 8.6 behavior: *If the -private flag is given, and the -scope flag is not given, the list of methods will also include the non-exported methods of the class*
      
      I'm not sure if the Tcl 9 implementation needs to be fixed or the documentation. If the latter, an Tcl 8 incompatibility note would be desirable.
      
    5. foundin initialized to: "9.0b2"
    6. is_private initialized to: "0"
    7. login: "apnadkarni"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "9546e9877f1a8899e25a89082561ee694e7fb402"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "apnadkarni"
    14. subsystem initialized to: "35. TclOO Package"
    15. title initialized to:
      Incompatible change in behavior of -private option to info class methods command
      
    16. type initialized to: "Bug"
  2. Ticket change [522a4fdef3] (rid 225510) by apnadkarni on 2024-05-03 07:09:27:

    1. assignee changed to: "dkf"
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  3. Ticket change [0461952a8f] (rid 225511) by oehhar on 2024-05-03 07:18:43:

    1. icomment:
      Great catch!
      I hope, Donal will comment.
      Some tests here would be great too...
      
      Thanks,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [723390302a] (rid 226048) by dkf on 2024-05-15 18:42:03:

    1. icomment: "I don't recall specifically changing this."
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  5. Ticket change [557f639746] (rid 226049) by dkf on 2024-05-15 18:49:47:

    1. icomment:
      The only likely looking changes would be from [9294775086c983a3](https://core.tcl-lang.org/tcl/info/9294775086c983a3) ([TIP #500](https://core.tcl-lang.org/tips/doc/trunk/tip/500.md)) and *the result of that particular call is supposed to remain identical.* (`info class methods $cls -scope private` would be different...)
      
      I really thought I had test cases for all this.
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  6. Ticket change [5e4e46fde0] (rid 226050) by oehhar on 2024-05-16 06:52:20:

    1. icomment:
      Donal,
      thank you looking into this.
      
      So, the answer is, that this change was not intentional and "-private" should list public and private methods.
      
      That is an important statement.
      Perhaps other Wizards may find the cause...
      
      Thank you for all,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  7. Ticket change [38119435e8] (rid 226051) by dkf on 2024-05-16 07:52:33:

    1. icomment:
      It should list exactly the methods listed in 8.6. However, the set of possible methods is expanded:
      ```
      oo::class create C {
          method foo {} {}
          method Bar {} {}
          private method gorp {} {}
      }
      puts [info class methods C -private]
      ```
      This should list `foo` and `Bar` (in some order) but *not* `gorp`; that should only be present if `-scope private` is passed (and then that only fetches `gorp`; `-scope` doesn't work the same way).
      
      The problem likely lies between:
      * `InfoClassMethodsCmd` (and probably also `InfoObjectMethodsCmd`) in tclOOInfo.c,
      * `TclOOGetSortedMethodList` and `TclOOGetSortedClassMethodList` in tclOOCall.c, and
      * the testing of `info class methods` (and probably `info object methods`) in oo.test (around `oo-17.*` would have been the right place)
      
      I'm particularly irritated that there isn't a test of this case.
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  8. Ticket change [cbaf70c7f9] (rid 226052) by dkf on 2024-05-16 07:58:05:

    1. login: "dkf"
    2. mimetype: "text/plain"
    3. priority changed to: "8"
    4. severity changed to: "Important"
  9. Ticket change [fd6e5fe322] (rid 226059) by dkf on 2024-05-16 08:45:40:

    1. icomment:
      `tclOOCall.c` is uninvolved; that's only ever used when the `-all` option is passed.
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  10. Ticket change [a803dfaa92] (rid 226062) by dkf on 2024-05-16 08:53:33:

    1. icomment:
      Will be fixed by [bug-36e5517a6850](/tcl/timeline?r=bug-36e5517a6850).
      
    2. login: "dkf"
    3. mimetype: "text/x-markdown"
  11. Ticket change [738006777a] (rid 226063) by dkf on 2024-05-16 08:53:49:

    1. closedate changed to: "2460446.87070722"
    2. closer changed to: "dkf"
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"