GNU bug report logs - #62609
29.0.60; [PATCH] src/comp.c: New variable `comp-el-to-eln-strip-prefix` for `comp-el-to-eln-rel-filename`

Previous Next

Package: emacs;

Reported by: lin Sun <sunlin7 <at> yahoo.com>

Date: Sun, 2 Apr 2023 05:14:02 UTC

Severity: normal

Tags: patch, wontfix

Found in version 29.0.60

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: lin Sun <sunlin7 <at> yahoo.com>, Andrea Corallo <akrl <at> sdf.org>
Cc: bug-gnu-emacs <at> gnu.org
Subject: Re: 29.0.60;
 [PATCH] src/comp.c: New variable `comp-el-to-eln-strip-prefix`
 for `comp-el-to-eln-rel-filename`
Date: Sun, 02 Apr 2023 09:02:54 +0300
> From: lin Sun <sunlin7 <at> yahoo.com>
> Date: Sun, 2 Apr 2023 05:13:28 +0000
> 
> The emacs with native compile enabled will always rebuild all the
> ~/.emacs.d/eln-cache/VER/*.eln files if I moved/copied eln-cache
> folder from
> /home/userA/.emacs.d/eln-cache/ to
> /home/userB/.emacs.d/eln-cache/.
> 
> It is caused by the function `comp-el-to-eln-rel-filename` calculating
> the hash value from the absolute *.el filename to be the middle of the
> eln file name.

Thanks.

However, I'm not sure I understand: the names of the *.eln files
reflect the absolute name of the *.el file, so the *.eln files will be
regenerated when the *.el files are moved, not when the eln-cache
directory is moved.  Right?  Then what is the problem you are trying
to fix?

> The new variable `comp-el-to-eln-strip-prefix` in this patch will
> allow moving the eln-cache/ folder without rebuilding *.eln in it.

Sorry, I don't think I agree to this change (assuming I understand it
correctly).  We encode the absolute name of the *.el files in the
names of the *.eln files for a reason, so ignoring arbitrary parts of
those absolute names will lead to dangerous clashes.  Please keep in
mind that, unlike with *.elc files, loading an incorrect *.eln files
can crash Emacs.  So we must be very cautious in which files we allow
to load.

And again, I don't think I understand why moving eln-cache without
moving the source *.el files would require the *.eln files in
eln-cache to be recompiled.  Andrea, what am I missing here?




This bug report was last modified 2 years and 143 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.