Skip to content
Tcl Source Code History Of Ticket 2a0966cd
Login

History Of Ticket 2a0966cd

Artifacts Associated With Ticket 2a0966cd

  1. Ticket change [3747465377] (rid 219757) by dgp on 2023-10-23 19:39:43:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      I noted in Ticket [894e11d7f7] that when tclsh is built with
      a zipfs archive containing the Tcl script library, encoding files, etc.
      I still see an [encoding dirs] that gives preference to files
      installed in the native filesystem over those in the archive.  This is
      because I have an old history of installations of older Tcl 9.0a 
      snapshots and releases.  The files there are outdated and corrupt and
      hilarity ensues.
      
      This ticket opened to examine how [encoding dirs] obtains its default
      value and how that should change in the presence of zipfs archives.
      
    5. foundin initialized to: "8.7+"
    6. is_private initialized to: "0"
    7. login: "dgp"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "dgp"
    14. subsystem initialized to: "38. Init - Library - Autoload"
    15. title initialized to: "[encoding dirs] default values"
    16. type initialized to: "Bug"
  2. Ticket change [5fb47ccba6] (rid 219772) by dgp on 2023-10-25 17:57:18:

    1. icomment:
      
      See commits to branch bug-2a0966cdc9 for developments trying
      to bring these matters up to date.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  3. Ticket change [8029fed23c] (rid 220533) by jan.nijtmans on 2023-11-23 14:23:48:

    1. icomment:
      I had a look at this. So far, nice piece of clean-up!
      
      However, for 8.7 I would recommend to keep the stub entries: they are used in TclKit, maybe a few other extensions too. I wouldn't expect a minor Tcl release to remove those entries, even being internal.
      
      I'm sure there's more work to do here ....
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [4dd000db1a] (rid 253766) by apnadkarni on 2026-05-22 10:30:21:

    1. closedate changed to: "2461182.9377460531"
    2. closer changed to: "apnadkarni"
    3. icomment:
      Both encoding and library initialization has radically changed, with both bug fixes and TIP's. I don't see this in 9.0 where the zipfs path shows up first.
      
      Closing as part of bug cleanup. Please re-open if you still see zipfs not being given preference.
      
    4. login: "apnadkarni"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  5. Ticket change [125526ef62] (rid 253801) by dgp on 2026-05-22 17:09:21:

    1. closedate changed to: "2461183.2148289932"
    2. closer changed to: "dgp"
    3. icomment:
      
      zipfs is not being given preference.
      
      Tip of 9.0.* development:
      
      $ make runtest
      ...
      % encoding dirs
      /home/dgp/x86_64/linuxoldld/lib/tcl9.0/encoding //zipfs:/app/tcl_library/encoding
      
      For this system, this is a regression compared to Tcl 9.0.2.
      The regression arrived with the "fix" to bug 87b69745be
      in August 2025.
      
      That's as far as I have dug into the details. Will next turn
      to examining the breaking patch.
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  6. Ticket change [748384f3cd] (rid 253802) by dgp on 2026-05-22 17:09:40:

    1. closer changed to: "nobody"
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. resolution changed to: "None"
    5. status changed to: "Open"
  7. Ticket change [ce942addd6] (rid 253803) by dgp on 2026-05-22 17:29:29:

    1. icomment:
      That approach doesn't look fruitful.
      
      Will try looking directly at the code as it now exists instead.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  8. Ticket change [5ae095e19e] (rid 253815) by apnadkarni on 2026-05-23 11:04:26:

    1. icomment:
      Don,
      
      TL;DR I think the best approach is (as you suggested) prepend the zipfs
      directory instead of appending it to the search path. If you think this
      satisfactory, I'll make the modification. I don't think reverting back to
      just setting it (overwriting existing value) is advisable.
      
      Let me try to recall and summarize all the context regarding the
      [encoding dirs] issue.
      
      The original issue was that on macos tkinter was failing because it was
      not able to find init.tcl. This is connected to encodings because of the
      `encodings` directory located under `tcl_library`.
      
      With respect to why the zipfs path is appended and not set as used to be the
      case, see my reply *apnadkarni added on 2025-11-17 06:13:00:* in ticket
      [6fbabfe166](https://core.tcl-lang.org/tcl/tktview/6fbabfe166) in response
      to your query there.
      
      To reiterate, the cause of the failure was that the search path was set
      (*not appended*) to the zipfs location. The problem was that on macos, zipfs
      was either not present or not available **even on --enable-zipfs builds**.
      (I'll leave it to macos developers to explain under what circumstances and
      build configurations this can happen - see Marc and Jan's responses to
      [6fbabfe166](https://core.tcl-lang.org/tcl/tktview/6fbabfe166) for starters.
      The setting of search path overwrote the default macos path that would
      normally be used resulting in the failure.
      
      Appending instead of setting fixed the above problem.
      
      The other issue with setting/overwriting as I recall was that applications
      can call `Tcl_SetEncodingSearchPath` to set the encoding directories search
      path and it was not clear exactly when this might happen (the second point
      in the above-mentioned apnadkarni reply link). If that function has been
      called, it did not seem appropriate to overwrite it.
      
      If we were to revert to setting the directory search path instead of
      appending to it, someone needs to provide a solution for the above macos
      failure, either supporting zipfs builds or generating a configure / make
      error if --enable-zipfs is true, and testing it in appropriate build
      configurations. I'm not that person. Ignorant about all things mac, don't
      have a mac and Github CI is very painful way to develop.
      
      One possibility would to append in the case of macos and overwrite on other platforms. I am not in favor of different behaviors on different platforms though.
      
      All the above is reflective of Tcl 9.0.
      
      TIP 732 / 9.1 does not change anything substantial in the above because the
      initialization of the default path on macos is unchanged.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  9. Ticket change [4f2debc983] (rid 253825) by apnadkarni on 2026-05-23 14:48:25:

    1. icomment:
      See if the bug-2a0966cd works better. I prepends the zipfs path so it will be picked if present.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  10. Ticket change [9b81f34901] (rid 253826) by apnadkarni on 2026-05-23 14:57:32:

    1. icomment:
      Thinking about it further, I suppose one could also check if the zipfs location exists and if so overwrite instead of appending. Only in 9.1 where zipfs is initialized differently and earlier.
      
      Even if prepending works, I am hesitant to port back to 9.0 in a patch release in any case.
      
      My main difficulty in deciding is an inability to test the tkinter issue on macos.
      
    2. login: "apnadkarni"
    3. mimetype: "text/plain"
  11. Ticket change [bc999ed83f] (rid 253968) by apnadkarni on 2026-05-27 10:33:02:

    1. icomment:
      @dgp, Starting with [06eb2ddf6e], zipfs path is prepended to the encoding dir search path. Leaving this open in case you prefer some other solution (or if prepending does not solve your issue!)
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-fossil-plain"
  12. Ticket change [54e29e5079] (rid 253975) by dgp on 2026-05-27 13:18:20:

    1. icomment:
      
      I want to backport to 9.0 for testing and inclusion there.
      
      This patch seems to bring in whole new list utilities?
      
      Why is this so hard?
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  13. Ticket change [e57c09e9eb] (rid 253976) by dgp on 2026-05-27 13:21:30:

    1. icomment:
      
      Checked again and 9.0 branch already has an *IfAbsent() routine.
      
      Will just need to work through the merge conflict.
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  14. Ticket change [49a7bfb7ec] (rid 253977) by dgp on 2026-05-27 13:46:55:

    1. closedate changed to: "2461188.0742586111"
    2. closer changed to: "dgp"
    3. icomment:
      
      Confirmed that a backport to 9.0 resolves all the failing tests
      in my environment.  That is a good enough outcome for this round.
      
      Profuse thanks for continuing to support this chase.
      
      I will make the commits and merges.
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"