From: Sean Devlin <spd@toadstyle.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 74368@debbugs.gnu.org
Subject: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async
Date: Sat, 16 Nov 2024 14:38:08 -0500 [thread overview]
Message-ID: <93ACD03E-194E-4992-A23D-97A364F0A6F6@toadstyle.org> (raw)
In-Reply-To: <867c93iq68.fsf@gnu.org>
> On Nov 16, 2024, at 2:38 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
> tags 74368 notabug
> thanks
>
>> From: Sean Devlin <spd@toadstyle.org>
>> Date: Fri, 15 Nov 2024 12:04:42 -0500
>>
>> I'm not sure if this is a bug, but I noticed a difference in behavior
>> when compiling with native-compile and native-compile-async.
>>
>> Recipe:
>>
>> 1. mkdir /tmp/emacs-test
>> 2. printf ";; -*- lexical-binding: t; -*-\n\n(vertico-mode)\n" > /tmp/emacs-test/test.el
>> 2. HOME=/tmp/emacs-test emacs
>> 3. M-x package-install RET vertico RET
>> 4. M-: (native-compile "/tmp/emacs-test/test.el") RET
>> 5. M-! touch /tmp/emacs-test/test.el RET
>> 6. M-: (native-compile-async "/tmp/emacs-test/test.el") RET
>>
>> There is no warning when compiling synchronously, but there is a warning
>> during asynchronous compilation:
>>
>> test.el:3:2: Warning: the function ‘vertico-mode’ is not known to be
>> defined.
>>
>> I guess maybe the asynchronous compiler has not processed the autoloads
>> from installed packages, whereas the synchronous compiler has.
>>
>> Is this difference in behavior expected? Or is one of the compilers
>> behaving incorrectly?
>
> This is indeed expected, and not a bug. The asynchronous JIT
> native-compilation runs in a separate batch Emacs session, which
> doesn't load any of your init files. To avoid these warnings, you
> should make sure all of the *.el files that are natively compiled have
> all the requisite 'require's and/or 'eval-when-compile' to load all
> the dependency libraries when compiling the file as a stand-alone Lisp
> package.
I see, that makes sense. Thanks for the explanation.
next prev parent reply other threads:[~2024-11-16 19:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 17:04 bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async Sean Devlin
2024-11-16 7:38 ` Eli Zaretskii
2024-11-16 19:38 ` Sean Devlin [this message]
2024-11-16 21:26 ` Andrea Corallo
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=93ACD03E-194E-4992-A23D-97A364F0A6F6@toadstyle.org \
--to=spd@toadstyle.org \
--cc=74368@debbugs.gnu.org \
--cc=eliz@gnu.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).