Tcl Source Code

View Ticket
Login
Ticket UUID: 87e840c26cca1f18685ff6f943f2323664a19621
Title: TIP 430 / zipfs failures
Type: Bug Version: 8.7a3
Submitter: apnadkarni Created on: 2020-12-14 03:49:50
Subsystem: 18. Commands M-Z Assigned To: jan.nijtmans
Priority: 5 Medium Severity: Important
Status: Pending Last Modified: 2021-02-19 09:45:22
Resolution: Fixed Closed By: nobody
    Closed on:
Description:
The following observations pertain to TIP 430 functionality for 8.7. Perhaps the work is still in progress, but no work seems to have happened in that area for many months. So logging here so they don't get lost sight of:

1.  Although the TEA build for tclsh builds a ZIP containing Tcl scripts and attaches it to the tcl87.dll, the same is not done for Tk (and wish). Is this intentional? The TIP does not talk about this but it seems inconsistent.

2. Related to the above, if the Tk scripts are manually attached to tk87.dll they are not found by wish (unlike tclsh).

3. The TIP states “If the first argument to Tclsh or Wish is detected to be a zipfile, that file will be mounted as ZIPFS_ROOT/app. If ZIPFS_ROOT/app/main.tcl exists, that file is marked set the shell's startup script.” Currently this does not seem to be the case. The file is treated as a standard Tcl script with obvious errors.

4. The TIP also states “If install is the first argument, set subsequent arguments are passed to a new file in library install.tcl.” This does not seem to be happening either.

5.  Cannot get “zipfs mkimg” to work with static builds. The input scripts seem to overwrite the Tcl and Tk libraries already attached to the executable. Have not tried with shared builds.

6. The test suite has no tests for zipfs other than some basic argument checking.
User Comments: jan.nijtmans added on 2021-02-19 09:45:22:

At least 1) and 2) are fixed now. I'm not sure if 3), 4) and 5) was a good idea anyway: The "zip" utility can do everything we want, it's not necessary to duplicate this functionality in tclsh. At least, that's my 2c. 6) is difficult to do as well, but we have "github actions" now to build everything.


jan.nijtmans added on 2021-02-08 17:05:33:

> if the Tk scripts are manually attached to tk87.dll they are not found by wish

Well, I found the reason for this: It's a situation tcl_findLibrary (in auto.tcl) doesn't handle yet. Working on it .....


jan.nijtmans added on 2021-02-04 14:33:35:
"bug-87e840c26c" branch is getting into shape. It still depends on "zip" (not minizip), and it is not tested with 8.6 yet. But getting almost there.

apnadkarni added on 2021-01-21 17:02:05:
Just a clarification - the nmake Tk build has already been modified to attach the Tcl and Tk zipkits to the DLL.

jan.nijtmans added on 2020-12-14 17:45:41:

There's a "bug-87e840c26c" branch (in Tk) now, meant to work on this issue without the need to bother about Tcl 8.6 compatibility. This branch builds with Tcl 8.7 only.

Approach: 1) Make it work as expected with Tcl 8.7. 2) Worry about compatibility with Tcl 8.6 after that.

If compatibility with Tcl 8.6 gives more problems than expected, we can decide later what to do about it and if it is really worth it.