|
2026-05-22
| ||
| 10:06 | • Closed ticket [75291b89b3]: Documentation of zipfs in tclsh(1) plus 6 other ... artifact: 44628aeab3 user: apnadkarni | |
|
2024-08-06
| ||
| 06:38 | • Ticket [75291b89b3]: 3 changes artifact: f15b975a2c user: tberg | |
| 06:36 | resolution of ticket [75291b89b3] check-in: 6a6dac423f user: Torsten tags: zipfs-consolidation | |
|
2024-08-03
| ||
| 03:15 | • Ticket [75291b89b3] Documentation of zipfs in tclsh(1) status still Open wit... artifact: 9fb390326c user: apnadkarni | |
| 03:10 | • Ticket [75291b89b3]: 3 changes artifact: f0364b275f user: apnadkarni | |
|
2024-08-02
| ||
| 21:38 | • Ticket [75291b89b3]: 3 changes artifact: 0425ec512a user: tberg | |
|
2024-07-31
| ||
| 03:24 | • Ticket [75291b89b3]: 3 changes artifact: ce79109703 user: apnadkarni | |
|
2024-07-30
| ||
| 08:42 | • New ticket [75291b89b3]. artifact: 03949e7475 user: tberg | |
Documentation of zipfs in tclsh(1)
There are some statements in the tclsh(1) page about ZIPVFS. It is related to zipfs(n) but uses the term ZIPVFS for the heading instead. To minimize confusion (with the tclvfs package and the zipvfs driver there), maybe the heading should rather be termed "ZIPFS" instead??
The section goes on with:
If a top level directory tcl_library is present in the zip archive, it will become the directory loaded as env(TCL_LIBRARY).
It is not clear what exactly the term "the directory loaded as ..." means. Does it mean that the variable env(TCL_LIBRARY) is filled with the name/path of the zip archive? According to tclvars(n) this would mean the zipfs directory is returned by [info library] but that is not the case when trying the example code from the zipfs(n) page.
The manual page further says:
If a file named main.tcl is present in the top level directory of the zip archive, it will be sourced instead of the shell's normal command line handling.
Which shell is meant here? Tclsh/Wish? Then it should be written like this. And the part about the different command line handling should probably also go into zipfs(n) or does it not apply there? It could be emphasized here that this implies you cannot source another Tcl script anymore from the command line when calling the modified tclsh.
Note: the same applies to wish(1) which contains the same text.
6a6dac423fresolution of ticket [75291b89b3] check-in2024-08-06 06:36:41
Yes, ZIPVFS should probably say ZIPFS or **ZIP Virtual File System** And yes, the documentation is misleading, incomplete or wrong, I'm not sure which :-) I think the path referred to is correct when tclsh is build as a static shell and the ZIP is attached to it but not in the case of the default build where the ZIP attached to the tcl shared library, not tclsh itself. Will experiment and confirm. Further, I feel the `tclsh` should not mention `//zipfs:/` as the mount point but rather refer to `zipfs root` but that is a call we need to make as to whether to specifically document //zipfs:/ as the mount point.
Any other opinions? Otherwise I will soon change the documentation for both tclsh(1) and wish(1) accordingly:
- change the heading to "ZIPFS virtual file system"
- refer to the zipfs(n) manual page and the command
zipfs rootto retrieve the mount point - clarify the wording about
tcl_library
Ashok, did you get the chance to experiment with a zip attached to tclsh vs. attached to a library and what this means for tcl_library (and possibly [info library])?
Torsten,
Below is how tcl_library and tk_library look like for various build configurations.
tclsh:
| tcl_library
tclsh Configuration | Mount point @ zip path
--------------------------------|------------------------------------------------
--enable-shared --enable-zipfs | //zipfs:/lib/tcl/tcl_library
| //zipfs:/lib/tcl @ D:/tcl/90b3/x64/bin/tcl90.dll
--disable-shared --enable-zipfs | //zipfs:/app/tcl_library
| //zipfs:/app @ D:/tcl/90b3/x64-static/bin/tclsh90s.exe
* --disable-zipfs | D:/tcl/90b3/*/lib/tcl9.0
| No mount points
wish:
| tcl_library
| tk_library
wish Configuration | Mount point @ zip path
--------------------------------|------------------------------------------------
--enable-shared --enable-zipfs | //zipfs:/lib/tcl/tcl_library
| //zipfs:/lib/tk/tk_library
| //zipfs:/lib/tcl @ D:/tcl/90b3/x64/bin/tcl90.dll
| //zipfs:/lib/tk @ D:/tcl/90b3/x64/bin/tcl9tk90.dll
--disable-shared --enable-zipfs | //zipfs:/app/tcl_library
| //zipfs:/app/tk_library
| //zipfs:/app @ D:/tcl/90b3/x64-static/bin/wish90s.exe
* --disable-zipfs | D:/tcl/90b3/*/lib/tcl9.0
| D:/tcl/90b3/*/lib/tk9.0
| No mount points
Also note that the recipe for single file executables given in the TIP works only for --enable-shared builds, not for static shells. For static shells, you have to merge the embedded tcl_library zip with the application vfs, and then replace the embedded zip in the executable with the merged zip.
Also, forgot to mention, in case you have not seen it, the TclZipfs_AppHook manpage describes the search path for tcl_library et al. I just became aware of it and have not reviewed it yet.
I am not sure how to properly document this tcl_library thing but with the changes from ticket 7db9574a06, this is maybe ok now. Otherwise, someone else can find a good wording for this?
I just changed the heading as the last thing here and adapted the wording a bit.
Now implemented with commit 6a6dac423f147a85.
Your wording looks fine to me. Closing.