GNU bug report logs -
#78416
[PATCH] * src/lread.c (get-load-suffixes): Avoid module suffix with compressed suffix
Previous Next
Reported by: Lin Sun <sunlin7 <at> hotmail.com>
Date: Wed, 14 May 2025 06:27:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your bug report
#78416: [PATCH] * src/lread.c (get-load-suffixes): Avoid module suffix with compressed suffix
which was filed against the emacs package, has been closed.
The explanation is attached below, along with your original report.
If you require more details, please reply to 78416 <at> debbugs.gnu.org.
--
78416: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=78416
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
> From: Lin Sun <sunlin7 <at> hotmail.com>
> CC: "eggert <at> cs.ucla.edu" <eggert <at> cs.ucla.edu>, "78416 <at> debbugs.gnu.org"
> <78416 <at> debbugs.gnu.org>, "luangruo <at> yahoo.com" <luangruo <at> yahoo.com>
> Date: Wed, 21 May 2025 20:43:15 +0000
>
> From: Eli Zaretskii <eliz <at> gnu.org>
> Sent: Saturday, May 17, 2025 06:57 AM
>
> > Thanks, but I think you've misunderstood the comments. We should only
> > ignore the ".gz" suffix. Ignoring other suffixes would be a potential
> > regression, because there's nothing wrong in trying to load a file
> > called, say, foobar.so.abc. The current code supports that, and I see
> > no reason to drop that support.
>
> > The ".gz" suffix gets in the way because dynamic loaders cannot load
> > such compressed shared libraries.
>
> > So the condition for not appending a suffix from
> > load-file-rep-suffixes should also test the value of 'ext', and only
> > refuse to append it if it compares equal with ".gz".
>
> Yes, you're right.
>
> According to the document of "load-file-rep-suffixes", the "jka-compr-load-suffixes" is used for the compressed suffixes.
> So I attach a new patch, the patch will seek the "jka-compr-load-suffixes" to determine the compressed suffixes for emacs module and skip it.
> Please check the attached patch for details. Thank you.
Thanks, I installed this on the master branch, and I'm closing the
bug.
P.S. Please see how I modified the commit log message, and try to
follow this style in the future.
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
The Emacs (with module) will try load module with compressed suffix ".gz", for example, (require 'X) will trigger emacs try load file X.dll, X.dll.gz... on windows, but the "X.dll.gz" does not loadable, it affects performance especially on windows.
This patch make the (get-load-suffixes) function return result contains the ".dll" but avoid the ".dll.gz".
Please help review the patch. Thank you.
[0001-src-lread.c-get-load-suffixes-Avoid-module-suffix-wi.patch (text/x-patch, attachment)]
This bug report was last modified 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.