unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Andrea Corallo <akrl@sdf.org>, 48079@debbugs.gnu.org
Subject: bug#48079: Temporary files while building after native-comp merge
Date: Sun, 2 May 2021 05:12:24 -0500	[thread overview]
Message-ID: <CADwFkmkr9FwgXfp7rHZV1OOsHA58YQ_y=EuvHEb24u+C95o7Qg@mail.gmail.com> (raw)
In-Reply-To: <87r1ipimla.fsf@gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1356 bytes --]

tags 48079 - patch
thanks

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Stefan Kangas <stefan@marxist.se> writes:
>
>> But perhaps the fix is as simple as:
>>
>> diff --git a/.gitignore b/.gitignore
>> index fcbc9cd7f4..e27ebe36d0 100644
>> --- a/.gitignore
>> +++ b/.gitignore
>> @@ -135,6 +135,7 @@ src/gl-stamp
>>  *.dll
>>  *.core
>>  *.elc
>> +*.elc[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]
>>  *.eln
>>  *.o
>>  *.res
>
> Sounds like a good idea to me.  (But add a comment about what these
> files are.)

Thanks.

But now I am seeing that some of these files have not been deleted in my
tree:

    lisp/emacs-lisp/comp.elcivrXZS
    lisp/window.elc9aaVMg

This might be because I interrupted the build process at some point; I
don't know.

These files don't get removed when I run extraclean or bootstrap.  So if
we just ignore them there is a risk that these files will slowly build
up over time.

Perhaps we should also make sure they get cleaned up when building, as
in the attached.

Another alternative, arguably more correct, would be to figure out
exactly under which circumstances these files gets left over and delete
them there.  (There is a let-bound `kill-emacs-hook' in
`byte-compile-file', which might be a good place to start looking.)
What makes this a bit tricky is that this is somewhat hard to reproduce.

[-- Attachment #2: 0001-Delete-temporary-.elcXXXXXX-files-created-when-compi.patch --]
[-- Type: text/x-diff, Size: 2084 bytes --]

From 54a57a777968dc5ae12256a661ad2d548cc9bfd0 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefan@marxist.se>
Date: Thu, 29 Apr 2021 13:16:13 +0200
Subject: [PATCH] Delete temporary *.elcXXXXXX files created when compiling

* lisp/Makefile.in (compile-clean):
* test/Makefile.in (clean): Delete left-over *.elcXXXXXX files created
when compiling.

* .gitignore: Ignore temporary *.elcXXXXXX files created when
compiling.  (Bug#48079)
---
 .gitignore       | 3 +++
 lisp/Makefile.in | 2 ++
 test/Makefile.in | 2 +-
 3 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index fcbc9cd7f4..14882b5353 100644
--- a/.gitignore
+++ b/.gitignore
@@ -148,6 +148,9 @@ oo-spd/
 src/*.map
 vgcore.*[0-9]
 
+# Temporary files when byte-compiling.
+*.elc[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]
+
 # Tests.
 test/manual/biditest.txt
 test/manual/etags/srclist
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index b970451dd2..de2c8fcad1 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -345,6 +345,7 @@ compile-main:
 
 .PHONY: compile-clean
 # Erase left-over .elc files that do not have a corresponding .el file.
+# Also erase any left-over temporary files such as "*.elcivrXZS".
 compile-clean:
 	@cd $(lisp) && \
 	elcs=`echo "${SUBDIRS_REL} " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \
@@ -354,6 +355,7 @@ compile-clean:
 	    rm "$${el}c"; \
 	  fi; \
 	done
+	find $(lisp) -name '*.elc[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]' $(FIND_DELETE)
 
 .PHONY: gen-lisp leim semantic
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 84ab4e70ae..d04376be56 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -339,7 +339,7 @@ mostlyclean:
 	rm -f ./*.tmp
 
 clean:
-	find . '(' -name '*.log' -o -name '*.log~' ')' $(FIND_DELETE)
+	find . '(' -name '*.log' -o -name '*.log~' -o -name '*.elc[0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z][0-9A-Za-z]' ')' $(FIND_DELETE)
 	rm -f $(test_module_dir)/*.o $(test_module_dir)/*.so \
 	  $(test_module_dir)/*.dll
 
-- 
2.30.2


  reply	other threads:[~2021-05-02 10:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 11:10 bug#48079: Temporary files while building after native-comp merge Stefan Kangas
2021-04-28 12:10 ` Eli Zaretskii
2021-04-28 12:30   ` Eli Zaretskii
2021-04-28 13:14     ` Stefan Kangas
2021-04-28 19:27       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-28 21:26         ` Stefan Kangas
2021-04-29  5:14           ` Eli Zaretskii
2021-04-29  8:19             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29  9:20               ` Eli Zaretskii
2021-04-29 10:15                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-02 23:38                   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-03 17:14                     ` Eli Zaretskii
2022-01-06 16:10                       ` Andrea Corallo
2022-01-06 16:30                         ` Glenn Morris
2022-01-06 16:48                           ` Eli Zaretskii
2022-01-06 17:15                         ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-01-07 16:30                           ` Andrea Corallo
2022-01-14 15:58                             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-29 11:22               ` Stefan Kangas
2021-04-29  8:18           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-02  8:09           ` Lars Ingebrigtsen
2021-05-02 10:12             ` Stefan Kangas [this message]
2021-05-02 10:18               ` Lars Ingebrigtsen
2021-05-02 21:36               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-05  8:35               ` Lars Ingebrigtsen
2021-05-05 12:11                 ` Eli Zaretskii
2021-05-05 12:47                   ` Lars Ingebrigtsen
2021-05-05 14:01                     ` Eli Zaretskii
2021-05-05 14:24                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-05-06  9:15                         ` Lars Ingebrigtsen
2021-05-06 10:12                           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-28 19:24     ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-24 12:36 ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CADwFkmkr9FwgXfp7rHZV1OOsHA58YQ_y=EuvHEb24u+C95o7Qg@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=48079@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    --cc=larsi@gnus.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.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).