Skip to content
Tcl Source Code History Of Ticket 3057b6261
Login

History Of Ticket 3057b6261

Artifacts Associated With Ticket 3057b6261

  1. Ticket change [adb3421433] (rid 234257) by jan.nijtmans on 2024-10-15 12:28:56:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      Inspired by [1b8a893ded]: Allow ':'/';' in TCLLIBPATH
      
      For consistancy with HOME/PATH/TCL_PACKAGE_PATH. Since paths on Windows don't contain ';' and paths on UNIX don't contain ':' (doing that would create other problems), this is an infinitely small **potential incompatibility**
      
    5. is_private initialized to: "0"
    6. login: "jan.nijtmans"
    7. priority initialized to: "5 Medium"
    8. private_contact initialized to: "0c50e5320704d174412e57b873d8932de15303e0"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "jan.nijtmans"
    13. subsystem initialized to: "08. Environment Variables"
    14. title initialized to:
      Allow ':' (';' on Windows) as separator in TCLLIBPATH
      
    15. type initialized to: "RFE"
  2. Ticket change [aad6db4b62] (rid 234264) by pooryorick on 2024-10-15 19:18:35:

    1. icomment: "No, no no. Don't change this."
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [58e36a43ab] (rid 234265) by pooryorick on 2024-10-15 19:19:38:

    1. icomment: "Also, change TCL_PACKAGE_PATH back."
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [0c348e70b2] (rid 234381) by apnadkarni on 2024-10-19 03:48:09:

    1. icomment:
      I am confused by this RFE. `TCLLIBPATH` is documented to have a Tcl list syntax. Is the suggestion to move to a "native" : or ; separated syntax?
      Could //zipfs:/myapp/lib reasonably be in TCLLIBPATH requiring the : to be escaped? Just string replacement of `:` or `;` with spaces (in the rfe-3057 branch) on a list and expecting correct list structure to be maintained is frought in my opinion.
      
      If at all any changes are to be made, I am in favour of a broader review of environment variable syntax instead of isolated point changes to specific variables. Choice of platform specific versus Tcl syntax impacts
      
      - File path separators in environment variables. `/`, `\` or both? `TCLLIBPATH` requires `/`, `TCL_LIBRARY`, `HOME` and `TCL*_TM_PATH` (on Windows, dunno about Unix) accepts either.
      
      - Quoting / escaping. How are spaces or `:` in a zipfs path escaped? In the case of `TCLLIBPATH` the `\` is used for escaping as standard Tcl syntax. In the case of `TCL*_TM_PATH`, I am not sure.
      
      - If the environment variable is a list, what is its syntactic structure? As a Tcl list, or using ":" or ";" in a platform specific manner? Currently `TCLLIBPATH` is a Tcl list, `TCL*_TM_PATH` uses the latter platform specific form.
      
      These are all interrelated, e.g. if using Tcl syntax, then `\` cannot be used as a file path separator. 
      
      Current behaviour seems to be inconsistent between environment variables, for better or worse. If any changes are to be made, they should not be done in isolation.
      
    2. login: "apnadkarni"
    3. mimetype: "text/x-markdown"
  5. Ticket change [e4d1d6bcb5] (rid 234387) by pooryorick on 2024-10-19 08:49:17:

    1. icomment:
      The Tcl list format is the best choice for representing data in a
      platform-agnostic manner.  This includes structured data that is stuffed into
      environment variables.  One thing that is underappreciated is that when items
      in a Tcl list are enclosed in double quotes, with characters in the enclosed
      value properly escaped, the Tcl list is readable by both Tcl and a Posix shell.
      That is, it is trivial to write an sh function that produces a Tcl list, and
      then for either an sh or Tcl interpreter to consume that same list.  This is
      how the list can be consumed in sh:
      
      <code><verbatim>
      mylist="\"one two\" \"three four\" \"five six\""
      eval set -- $mylist
      for i in "$@"; do printf '%s\n' "$i"; done
      </verbatim></code>
      
      If Tcl standardizes on using Tcl lists to communicate structured data, each
      existing and future platform can easily adapt the data to meet its own needs.
      It also allows the implementation of Tcl itself to remain more simple.  When
      the format of TCL_PACKAGE_PATH was changed recently, the following code was
      added to parse the foreign format:
      
      	https://core.tcl-lang.org/tcl/info/c2a94d79f639037e
      
      Accretions of such add-hoc parsing in the Tcl code base over time are clearly
      undesirable. Standardizing on Tcl lists offers a way to stay out of such
      messes.
      
    2. login: "pooryorick"
    3. mimetype: "text/x-fossil-wiki"