Overview
| Artifact ID: | 093454c956ec2841d5f3c80b8c9e3da54495832fd314bcfbb280d4ef9bb4a1fd |
|---|---|
| Ticket: | b9f3ff8fe69cae04239a2de23601d51b289dad06
Errors/ambiguities in zipfs(n) manual page |
| User & Date: | tberg on 2024-07-30 07:11:56 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
Here are some points which I think should be fixed in the zipfs(n) manual page. As I am not totally sure about them, this ticket asks for comments before I just change the manual page. ## 1. requiring the package The manual page indicates to use ``` package require tcl::zipfs ?1.0? ``` in order to use the zipfs commands. In a normal Tcl9.0b3 interpreter, you can just use the commands without this line. I believe this fact should be documented or rather it should be documented under which circumstances the line is needed. The source code of zipfs does not give me any indication of when the line would be needed. (This is actually true for other packages as well, msgcat e.g.). ## 2. package version The manual page states the version is 1.0, the [zipfs.c source](https://core.tcl-lang.org/tcl/file?name=generic/tclZipfs.c&ci=c971e6c7c4&ln=6270) does: ``` Tcl_PkgProvide(interp, "tcl::zipfs", "2.0"); ``` Shouldn't the documentation be brought in line with the implementation or is version 2.0 wrong as this is a new package and some aspects are even declared experimental? By the way, the zipfs.test file has a test and also expects "2.0" as result. ## 3. zipfs mount point The manual page says the mount point for zipfs volumes is “//zipfs:/” **on most platforms**. This is a bit too loosely documented as it leaves the user with the burden to find out (using `zipfs root`). However, I cannot find any indication in the source code of the mount point being platform-dependent. It just says [in line 89](https://core.tcl-lang.org/tcl/file?name=generic/tclZipfs.c&ci=c971e6c7c4&ln=89): #define ZIPFS_VOLUME "//zipfs:/" Am I correct that the mount point is actually platform-independent and always the same? If true, this needs fixed in the documentation. If this is not the case, the various possible mount points and the platforms for which they apply should be listed. ## 4. zipfs mkimg syntax The [zipfs mkimg] syntax is specified like this: ``` zipfs mkimg outfile indir ?strip? ?password? ?infile? ``` This indicates one could leave out any of the three optional parameters and `zipfs` would figure out what is meant. This is not true. The syntax rather has four different forms: ``` zipfs mkimg outfile indir zipfs mkimg outfile indir strip zipfs mkimg outfile indir strip password zipfs mkimg outfile indir strip password infile ``` So, e.g., you cannot really skip `?strip?` and then specify `?password?` only. When I misunderstand the way such syntax is to be read, then I propose we need a separate manual page explaining how to read Tcl syntax in general (it would be good practice anyway). If I understand correct, it is not possible to create an unstripped image with a password. At least, this is not documented. Is my impression true? Of course, I can always provide empty strings for the parameters I don't care about but what happens then is not explicitly documented for `?strip?`. I would thus rather have the syntax documented as written above instead of with three optional parameters that are not optional in this sense. Any insights? ## 5. experimental code? The `mkimg` subcommand documentation contains the comment: "Caution: highly experimental, not usable on Android, only partially tested on Linux and Windows." Is is unclear what this means. Which parts are tested and which not? Can the subcommand actually be used? It worked for me using macOS so this could also count as being partly tested. Further, there is an extensive zipfs.test file and testing Tcl9.0b2 and b3 has not resulted in any error being reported on any platform as far as I can tell. Is the sentence obsolete?
- foundin changed to: "9.0"
- is_private changed to: "0"
- login: "tberg"
- priority changed to: "5 Medium"
- private_contact changed to: "94879582b1b42c382be6941728fabc85e28a2f74"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "tberg"
- subsystem changed to: "- New Builtin Commands"
- title changed to: "Errors/ambiguities in zipfs(n) manual page"
- type changed to: "Bug"