emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59115: closed (29.0.50; byte-recompile-directory incorrectly ignorin


From: GNU bug Tracking System
Subject: bug#59115: closed (29.0.50; byte-recompile-directory incorrectly ignoring files)
Date: Wed, 09 Nov 2022 08:41:01 +0000

Your message dated Wed, 09 Nov 2022 08:39:54 +0000
with message-id <87fseso71h.fsf@posteo.net>
and subject line Re: bug#59115: 29.0.50; byte-recompile-directory incorrectly 
ignoring files
has caused the debbugs.gnu.org bug report #59115,
regarding 29.0.50; byte-recompile-directory incorrectly ignoring files
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59115: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59115
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: 29.0.50; byte-recompile-directory incorrectly ignoring files Date: Mon, 07 Nov 2022 19:49:58 -0500 User-agent: mu4e 1.9.1; emacs 29.0.50

Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7
introduced a bug which will cause byte-recompile-directory to invert the semantics of the byte-compile-ingore-files option.

To reproduce:

1. mkdir /tmp/bug/ && cd /tmp/bug/
2. Copy an elisp file which would normally be byte-compiled into that directory 3. emacs -Q --batch --eval "(byte-recompile-directory default-directory 0 'force)"

You should see output similar to:

Checking /tmp/bug...
Done (Total of 0 files compiled)


In general the entire logic of byte-recompile-directory is messy.
Two ifs without elses, lots of negated predicates, etc. I can see why the mistake was easy to overlook. This could be further refactored to make it easier to read by leveraging when/unless appropriately. Perhaps there's an argument for some abnormal hooks in place of those long chains of ad-hoc predicates, but I'm more interested in fixing the problem now.

The attached patch fixes it for me.

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.34, cairo version 1.17.6) of 2022-11-07 built on nbook
Repository revision: 35221a7bd55e18244604376497097f4259c7351b
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101004
System Description: Arch Linux

Attachment: 0001-bytecomp.el-byte-recompile-directory-Fix-negated-ign.patch
Description: fix-byte-recompile-directory


--- End Message ---
--- Begin Message --- Subject: Re: bug#59115: 29.0.50; byte-recompile-directory incorrectly ignoring files Date: Wed, 09 Nov 2022 08:39:54 +0000
Eli Zaretskii <eliz@gnu.org> writes:

>> From: No Wayman <iarchivedmywholelife@gmail.com>
>> Date: Mon, 07 Nov 2022 19:49:58 -0500
>> 
>> Commit 8638aace3fbe01529f33870f469fa60bf5e43ee7
>> introduced a bug which will cause byte-recompile-directory to 
>> invert the semantics of the byte-compile-ingore-files option.
>> 
>> To reproduce:
>> 
>> 1. mkdir /tmp/bug/ && cd /tmp/bug/
>> 2. Copy an elisp file which would normally be byte-compiled into 
>> that directory
>> 3. emacs -Q --batch --eval "(byte-recompile-directory 
>> default-directory 0 'force)"
>> 
>> You should see output similar to:
>> 
>> Checking /tmp/bug...
>> Done (Total of 0 files compiled)
>> 
>> 
>> In general the entire logic of byte-recompile-directory is messy.
>> Two ifs without elses, lots of negated predicates, etc. I can see 
>> why the mistake was easy to overlook. This could be further 
>> refactored to make it easier to read by leveraging when/unless 
>> appropriately. Perhaps there's an argument for some abnormal hooks 
>> in place of those long chains of ad-hoc predicates, but I'm more 
>> interested in fixing the problem now.
>> 
>> The attached patch fixes it for me.
>
> Philip, can you look into tis, please?

Yes, the patch makes sense.  I'm going to apply the patch.

Thanks.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]