Skip to content
Tcl Source Code History Of Ticket 1acd172c424b57c9
Login

History Of Ticket 1acd172c424b57c9

Artifacts Associated With Ticket 1acd172c424b57c9

  1. Ticket change [6f84a9e048] (rid 222863) by jan.nijtmans on 2024-03-11 10:19:43:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Testcases in TIP #866 implementation show a different error-message for http::idna unknown command handling compared to trunk. This shows something unexpected is happening:
      <pre>
      ==== http-idna-1.2.0 IDNA package: basics FAILED
      ==== Contents of test case:
      
          ::tcl::idna ?
      
      ---- Result was:
      unknown subcommand "?": must be decode, encode, puny, or version
      ---- Result should have been (exact matching):
      unknown or ambiguous subcommand "?": must be decode, encode, puny, or version
      ==== http-idna-1.2.0 FAILED
      
      </pre>
      
    5. foundin initialized to: "TIP #866 implementation"
    6. is_private initialized to: "0"
    7. login: "jan.nijtmans"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "jan.nijtmans"
    14. subsystem initialized to: "21. [namespace]"
    15. title initialized to:
      Ensemble compilation leads to change in "unknown" behavior
      
    16. type initialized to: "Bug"
  2. Ticket change [4fc51f1c16] (rid 222865) by jan.nijtmans on 2024-03-11 10:31:03:

    1. assignee changed to: "sebres"
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  3. Ticket change [6ddc922fb1] (rid 222954) by sebres on 2024-03-12 14:18:51:

    1. comment changed to:
      Testcases in TIP #688 implementation show a different error-message for http::idna unknown command handling compared to trunk. This shows something unexpected is happening:
      <pre>
      ==== http-idna-1.2.0 IDNA package: basics FAILED
      ==== Contents of test case:
      
          ::tcl::idna ?
      
      ---- Result was:
      unknown subcommand "?": must be decode, encode, puny, or version
      ---- Result should have been (exact matching):
      unknown or ambiguous subcommand "?": must be decode, encode, puny, or version
      ==== http-idna-1.2.0 FAILED
      
      </pre>
      
    2. foundin changed to: "TIP #688 implementation"
    3. icomment:
      I don't know whether it is the same issue (however all versions 8.6+ seem to affected), but since it's pretty reproducible in sebres-8-6-clock-speedup-cr2 (where the compilation of mapped ensemble still there), we can combine both things in the same ticket.
      
      The issue:
      ```
      interp alias {} dis {} ::tcl::unsupported::disassemble
      proc test {} { clock format 0 -too-few-options-4-test }; 
      time {
        puts [list [catch test msg] $msg]; # puts [dis proc test]
      } 2
      ```
      produce:
      ```
      1 {wrong # args: should be "clock format clockval|-now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"}
      1 {wrong # args: should be "::tcl::clock::format clockval|-now ?-format string? ?-gmt boolean? ?-locale LOCALE? ?-timezone ZONE?"}
      ```
      So rewrite ensemble stops to work after epoch change (here caused by auto load of ::tcl::clock stubs), see 2nd output.
      
      The compilation of ensemble (either compile of `INST_INVOKE_REPLACE` or recompilation TEBC after epoch switch) seems to have a bug, which causes that `TclInitRewriteEnsemble` would be not executed at some point anymore.
      Uncommenting of dissassemble shows that the epoch changes and proc-code indeed losses `INST_INVOKE_REPLACE` instruction hereafter.
      
      Non-compiled ensemble does it correct, because in that case `TclInitRewriteEnsemble` is invoked from NRE by invocation of main ensemble command.
      
    4. login: "sebres"
    5. mimetype: "text/x-markdown"
  4. Ticket change [367dfe0b97] (rid 222979) by sebres on 2024-03-12 19:30:15:

    1. icomment:
      [5984cb59e7] doesn't fix initial issue, but makes the error message proper (there is only one case where subcommand can be ambiguous), so it'd then behave equal to non-compiled ensemble.
      
      For the second part (with INST_INVOKE_REPLACE) I have also a solution - previously, INST_INVOKE_REPLACE was never emitted for compiled ensembles (probably because one doesn't expects they will fail). I found the way to emit it instead of simple invocation.
      
    2. login: "sebres"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [db44fe5beb] (rid 223035) by sebres on 2024-03-12 21:50:49:

    1. closedate changed to: "2460382.4102966"
    2. closer changed to: "sebres"
    3. icomment:
      You were right with side effect: setting of flags for namespace compilation removed TCL_ENSEMBLE_PREFIX flag (so such ensembles, inclusive clock, didn't allow prefixes completely).
      
      Fixed in [f665afd65e] together with correct compilation of INST_INVOKE_REPLACE for ensemble commands.<br/>
      There is also as expected no speed regression anymore.
      
      Shall we add regression test for prefixes, like <code>[clock f 0]</code>?
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  6. Ticket change [cbd7774730] (rid 223038) by sebres on 2024-03-12 22:41:05:

    1. closer changed to: "nobody"
    2. icomment:
      Hmm... somehow the performance regression is back...<br/>
      Searching for the issue.
      
    3. login: "sebres"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "None"
    6. status changed to: "Open"
  7. Ticket change [ba2f723e35] (rid 223061) by sebres on 2024-03-13 00:13:41:

    1. closedate changed to: "2460382.50950544"
    2. closer changed to: "sebres"
    3. icomment:
      The regression was only for not fully compiled commands, probably by an overhead similar to [3485833fffffffffffff], therefore the compilation with INST_INVOKE_REPLACE was a bad idea.
      
      Ultimately fixed now in [e535d3edc6305d23], that partially reverts [f665afd65ee7a5f9] and now do ensemble compilation for clock only.
      
      The "wrong # args" syntax adjusted for subcommands to provide proper "clock ..." usage by failures during compiled invocation.
      
      The ensemble still supports prefixes, test-cases pass too.
      
    4. login: "sebres"
    5. mimetype: "text/x-fossil-wiki"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"