zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Glenn Morris <rgm@stanford.edu>
Cc: zsh-users@zsh.org
Subject: Re: Portability of zwc files between zsh versions
Date: Sun, 14 Aug 2022 12:38:20 -0700	[thread overview]
Message-ID: <CAH+w=7aGsMMoxas9-PDZQaC3DJ_2xBSz_mJLV28OEddaRs_GDg@mail.gmail.com> (raw)
In-Reply-To: <87edxiadsf.fsf@xoc19.stanford.edu>

On Sun, Aug 14, 2022 at 11:19 AM Glenn Morris <rgm@stanford.edu> 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.


  reply	other threads:[~2022-08-14 19:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-14 18:19 Glenn Morris
2022-08-14 19:38 ` Bart Schaefer [this message]
2022-08-14 20:16   ` Peter Stephenson
2022-08-14 21:05     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7aGsMMoxas9-PDZQaC3DJ_2xBSz_mJLV28OEddaRs_GDg@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rgm@stanford.edu \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).