Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Portability of zwc files between zsh versions
- X-seq: zsh-users 27953
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Glenn Morris <rgm@xxxxxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: Portability of zwc files between zsh versions
- Date: Sun, 14 Aug 2022 12:38:20 -0700
- Archived-at: <https://zsh.org/users/27953>
- In-reply-to: <87edxiadsf.fsf@xoc19.stanford.edu>
- List-id: <zsh-users.zsh.org>
- References: <87edxiadsf.fsf@xoc19.stanford.edu>
On Sun, Aug 14, 2022 at 11:19 AM Glenn Morris <rgm@xxxxxxxxxxxx> wrote:
>
> The comments in Src/parse.c make me think that the intent was that zwc
> files should be loadable so long as FD_MAGIC|FD_OMAGIC haven't changed
In fact the files are not loadable in the event that any of the
wordcode definitions in parse.c have changed, such as the WC_FUNCDEF
edit in March 2020, among other possible conditions.
Possibly the right thing to do would be to remove the version check
and instead be more diligent about updating the *MAGIC values, I
suspect that the habit of doing the latter was forgotten when the
version check subsumed it.
> It's a bit of a
> nuisance to have to maintain a separate zwc file for each zsh version.
compinit already maintains separate compdumps of autoloads for each
version, so the expectation that the function bodies might need to be
re-zcompiled isn't especially outlandish?
> Is it intentional that zwc files aren't portable between zsh versions?
> If so, it would seem like the endian duplication wouldn't be that useful
> in practice?
The endian duplication is in case you have equivalent versions of zsh
on different machine architectures. That might not be as common as it
once was.
There have also been some significant improvements in file parsing
speed, so zcompile might not be as advantageous as in the past.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author