Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-08-27
18:25
Merge [ba61f74630229cdf]: Fix [3c26dec71e]: TCLX_y_TM_PATH - unspecified behaviour - change with 90b... check-in: 1772c0e5f9 user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2024-05-05
20:54 • Closed ticket [3c26dec71e]: TCLX_y_TM_PATH - unspecified behaviour - change with... artifact: 011af9748e user: jan.nijtmans
20:26
Fix [3c26dec71e]: TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc check-in: ba61f74630 user: jan.nijtmans tags: trunk, main
20:05
Fix [3c26dec71e]: TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc check-in: 3aa138d095 user: jan.nijtmans tags: core-8-6-branch
04:52 • Ticket [3c26dec71e] TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc<... artifact: 79ab7c7719 user: apnadkarni
2024-05-04
18:55 • Ticket [3c26dec71e]: 3 changes artifact: 8648d97213 user: jan.nijtmans
18:53
Possible solution for [3c26dec71e]: TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc closed check-in: a966eb9902 user: jan.nijtmans tags: bug-3c26dec71e
15:03 • Ticket [3c26dec71e] TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc<... artifact: 79dfd87bab user: apnadkarni
2023-11-18
20:03 • New ticket [3c26dec71e]. artifact: 1af941f4d5 user: juliannoble2

TCLX_y_TM_PATH - unspecified behaviour - change with 90b1rc

Closed / Fixed3c26dec71e1908160a329296b471a7f3bf662661Created 3 years agoUpdated 3 years ago
Descriptionplain2023-11-18 20:03:25
There is a minor behaviour change between previous versions 9 & 8.x  compared to 90b1rc relating to extra semicolons in the TCLX_y_TM_PATH.  (tested only on windows)
If the user has specified c:/path;   previous interps added an empty string to the tcl::tm::list - which doesn't seem to have provided any utility - but didn't seem to break anything.
In  90b1rc - the extra entry causes the first package load in any interp to fail with an error:

  % package require platform
   is ancestor of existing module path //zipfs:/lib/tcl/tcl9/site-tcl.
  % set ::errorInfo
   is ancestor of existing module path //zipfs:/lib/tcl/tcl9/site-tcl.
      while executing
  "path add $expanded_path"
      (procedure "::tcl::tm::Defaults" line 22)
      invoked from within
  "::tcl::tm::Defaults"
      (file "//zipfs:/lib/tcl/tcl_library/tm.tcl" line 383)
      invoked from within
  "::source -nopkg //zipfs:/lib/tcl/tcl_library/tm.tcl"
      ("uplevel" body line 1)
      invoked from within
  "uplevel 1 [list ::source -nopkg $filename]"
      (procedure "::tcl::Pkg::source" line 5)
      invoked from within
  "::tcl::Pkg::source //zipfs:/lib/tcl/tcl_library/tm.tcl"
      (in namespace eval "::" script line 1)
      invoked from within
  "namespace eval :: $auto_index($name)"
      (procedure "auto_load" line 13)
      invoked from within
  "auto_load $name [uplevel 1 {::namespace current}]"
      (autoloading "::tcl::tm::UnknownHandler")
      (procedure "::unknown" line 22)
      invoked from within
  "::tcl::tm::UnknownHandler ::tclPkgUnknown platform 0-"
      ("package unknown" script)
      invoked from within
  "package require platform"

This more strict behaviour may well be reasonable - as a trailing or leading delimiter presumably shouldn't be present. 
I mention it only as a minor incompatibility that may cause confusion or hidden issues if the first package load is wrapped in a catch, so perhaps it's merely worth a note regarding upgrading to 9.0

As alternative possibility - I believe at least some linux distributions use an extra delimiter to represent the intention to add CWD to a list of paths specified.  We already have that capability with path;.  so I don't know if Tcl should interpret extraneous semicolons in some explicitly specified manner or if an error is the right behaviour in this instance anyway.
Referenced by4
apnadkarniplain2024-05-04 15:03:18
I'm inclined to say all empty elements should be discarded. This includes the trailing ";" case but also the case of consecutive ";" elements.
jan.nijtmanswiki2024-05-04 18:55:32

Possible solution [here]

apnadkarniplain2024-05-05 04:52:25
The behaviour (ignoring all empty) and fix seems reasonable to me.
jan.nijtmanswiki2024-05-05 20:54:07

Fixed [here]

Log in (anonymous is fine) to add a comment.