From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: larsi@gnus.org, emacs-devel@gnu.org, stefankangas@gmail.com,
akrl@sdf.org
Subject: Re: native-comp-async-report-warnings-errors default value
Date: Tue, 07 Dec 2021 17:54:49 +0100 [thread overview]
Message-ID: <87wnkgl5ie.fsf@gmail.com> (raw)
In-Reply-To: <8335n4zdyx.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 07 Dec 2021 16:28:22 +0200")
>>>>> On Tue, 07 Dec 2021 16:28:22 +0200, Eli Zaretskii <eliz@gnu.org> said:
>> Itʼs not in the elisp manual. I think the docstring of
>> `native-comp-async-report-warnings-errors' is also not discoverable
>> from the *Warnings* buffer, from what I remember.
Eli> We can always improve the documentation in this area. Feel free to
Eli> propose a patch, or explain what needs to be improved there, so that
Eli> someone else could do it.
Let the wordsmithing begin!
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 523758c10f..a3557e6855 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -924,7 +924,11 @@ Native-Compilation Functions
use while the compilation runs in the background. This is the method
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
file that is loaded into Emacs, when no natively-compiled file for it
-is available.
+is available. Note that because of this use of a subprocess, native
+compilation may produce warning and errors which byte-compilation does
+not, and lisp code may thus need to be modified to work correctly. See
+@code{native-comp-async-report-warnings-errors} in @xref{Native-Compilation
+Variables} for more details.
@defun native-compile-async files &optional recursively load selector
This function compiles the named @var{files} asynchronously. The
@@ -1038,6 +1042,12 @@ Native-Compilation Variables
@code{t} means display the resulting buffer. To log warnings without
popping up the @file{*Warnings*} buffer, set this variable to
@code{silent}.
+
+ A common cause for asynchronous native-compilation to produce
+warnings is compiling a file that is missing some @code{require} of a
+necessary feature. The feature may be loaded into the main emacs, but
+because native compilation always starts from a subprocess with a
+pristine environment, that may not be true for the subprocess.
@end defopt
@defopt native-comp-async-query-on-exit
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 523758c10f..850cdff465 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -924,7 +924,10 @@ Native-Compilation Functions
use while the compilation runs in the background. This is the method
used by Emacs to natively-compile any Lisp file or byte-compiled Lisp
file that is loaded into Emacs, when no natively-compiled file for it
-is available.
+is available. Note that because of this use of a subprocess, native
+compilation may produce warning and errors which byte-compilation does
+not, and lisp code may thus need to be modified to work correctly. See
+@code{native-comp-async-report-warnings-errors} for more details.
@defun native-compile-async files &optional recursively load selector
This function compiles the named @var{files} asynchronously. The
Regarding discoverability, the
*Warnings* buffer has entries like this:
Warning (comp): tex-site.el:168:31: Warning: the function
‘BibTeX-auto-store’ is not known to be defined. Disable showing
Disable logging
I guess we could add a link to
`native-comp-async-report-warnings-errors' when the warning type == (comp)
Robert
--
next prev parent reply other threads:[~2021-12-07 16:54 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-14 11:23 native-comp-async-report-warnings-errors default value Robert Pluim
2021-10-14 11:30 ` Eli Zaretskii
2021-10-14 11:43 ` Robert Pluim
2021-10-14 11:52 ` Eli Zaretskii
2021-10-14 14:48 ` Robert Pluim
2021-10-14 15:57 ` Eli Zaretskii
2021-10-14 16:42 ` Lars Ingebrigtsen
2021-10-14 16:47 ` Eli Zaretskii
2021-10-15 8:51 ` Robert Pluim
2021-10-14 12:07 ` Stefan Kangas
2021-10-14 12:12 ` Eli Zaretskii
2021-12-02 17:03 ` Stefan Kangas
2021-12-02 17:10 ` Lars Ingebrigtsen
2021-12-02 17:14 ` Andrea Corallo
2021-12-02 21:15 ` T.V Raman
2021-12-02 18:23 ` Eli Zaretskii
2021-12-02 19:27 ` Stefan Kangas
2021-12-02 19:42 ` Eli Zaretskii
2021-12-06 20:11 ` Stefan Kangas
2021-12-06 20:26 ` Eli Zaretskii
2021-12-07 7:51 ` Lars Ingebrigtsen
2021-12-07 9:37 ` Andrea Corallo
2021-12-07 9:42 ` Robert Pluim
2021-12-07 9:54 ` Andrea Corallo
2021-12-07 12:38 ` Robert Pluim
2021-12-07 14:28 ` Eli Zaretskii
2021-12-07 16:54 ` Robert Pluim [this message]
2021-12-07 17:16 ` Eli Zaretskii
2021-12-08 9:19 ` Robert Pluim
2021-12-08 13:23 ` Eli Zaretskii
2021-12-08 13:46 ` Andrea Corallo
2021-12-07 13:24 ` Stefan Monnier
2021-12-07 14:05 ` Andrea Corallo
2021-12-07 14:33 ` Eli Zaretskii
2021-12-07 14:15 ` Eli Zaretskii
2021-12-07 20:20 ` Lars Ingebrigtsen
2021-12-17 18:14 ` Stefan Kangas
2021-12-17 19:12 ` Eli Zaretskii
2021-12-17 19:27 ` Óscar Fuentes
2021-12-17 19:36 ` Stefan Kangas
2021-12-17 20:07 ` Stefan Kangas
2021-12-17 20:38 ` Eli Zaretskii
2021-12-17 20:53 ` Dmitry Gutov
2021-12-17 21:20 ` Colin Baxter 😺
2021-12-17 22:01 ` Ken Brown
2021-12-18 0:48 ` Dmitry Gutov
2021-12-18 14:38 ` Ken Brown
2021-12-18 16:58 ` Óscar Fuentes
2021-12-18 20:51 ` Ken Brown
2021-12-17 22:10 ` Rudolf Adamkovič
2021-12-17 21:10 ` Stefan Kangas
2021-12-18 0:24 ` Po Lu
2021-12-20 8:29 ` Andrea Corallo
2021-12-24 1:01 ` Dmitry Gutov
2021-12-24 1:34 ` T.V Raman
2021-12-24 9:53 ` Andrea Corallo
2021-12-25 0:05 ` Dmitry Gutov
2021-12-25 10:53 ` Andrea Corallo
2021-12-28 1:59 ` Dmitry Gutov
2021-12-30 9:37 ` Andrea Corallo
2022-01-08 2:29 ` Dmitry Gutov
2021-12-02 21:14 ` T.V Raman
2021-12-03 6:50 ` Eli Zaretskii
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=87wnkgl5ie.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=akrl@sdf.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=stefankangas@gmail.com \
/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).