From unknown Fri Aug 15 16:17:26 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#74368 <74368@debbugs.gnu.org> To: bug#74368 <74368@debbugs.gnu.org> Subject: Status: 31.0.50; Different warnings between native-compile and native-compile-async Reply-To: bug#74368 <74368@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:17:26 +0000 retitle 74368 31.0.50; Different warnings between native-compile and native= -compile-async reassign 74368 emacs submitter 74368 Sean Devlin severity 74368 normal tag 74368 notabug thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 15 12:05:02 2024 Received: (at submit) by debbugs.gnu.org; 15 Nov 2024 17:05:02 +0000 Received: from localhost ([127.0.0.1]:50705 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBzkk-0006Ix-6A for submit@debbugs.gnu.org; Fri, 15 Nov 2024 12:05:02 -0500 Received: from lists.gnu.org ([209.51.188.17]:43718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tBzkh-0006IT-NJ for submit@debbugs.gnu.org; Fri, 15 Nov 2024 12:05:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tBzkg-0006Qt-Eu for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2024 12:04:58 -0500 Received: from mail-qv1-xf32.google.com ([2607:f8b0:4864:20::f32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBzke-0005Zh-Dm for bug-gnu-emacs@gnu.org; Fri, 15 Nov 2024 12:04:58 -0500 Received: by mail-qv1-xf32.google.com with SMTP id 6a1803df08f44-6d18dff41cdso12670436d6.0 for ; Fri, 15 Nov 2024 09:04:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1731690294; x=1732295094; darn=gnu.org; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=ZkiSLJfP4rR4r1D8pFZYd2+HMBDaokGwlMpgtBAgIFM=; b=tnDbT0B8jff0130paPX5HDEkBQ78xJu8QnBO38yzxJHRGYCcaeq8fVfBV32g/eYB1u WJEp2sMKi3LYr+SQ+wCox4j+8t8AxKKolZtCb6PvnrMWOPmjc3ULVqvHDJzZmlWg2Mdt RKa9SIrK06BUZLb0pkK9A0yxFLV78WAEtfG2vlmL/GyPBBV7wU3lXMrrYPEwscBJ7o1t vgB7WkyBuS4Z806r2qrJtnl4KNf3Xki4ol+auHOkmCyYtBm/HnRivtxlLjt/N/noLr3d nnjNANqWxTS92Ml3c9I8DSz6MJ3ocmtH7yyU6JfZ9sygaSmVgouA4aa9ytSYMFiBbPf9 cd5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731690294; x=1732295094; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZkiSLJfP4rR4r1D8pFZYd2+HMBDaokGwlMpgtBAgIFM=; b=vBHqmBpNRVN6yySNL8q6VXgMtu/I879JaQr76mwZuDJrj3Oc57Vr3ZTsTV7SEHE7Tw U1qj6pF7OTqmFF7YHgM/StEd2or/Wx0tyJ3dtq/XpbiavRZHS0vY73J8xiwC+cB6T1SO vYPLU130q4lLxq9qhqgUh8USwLGfw100PVrqaWoN44sx0wRnM9AA9488LZhJpF2iS4t4 b4Ueo1xdlmif7bfLY+tAR5KH5H25hQWibuh5gRQsNdhRJEjA5hA1vS4syNY/fCYxvM/Z ODCY6dmn29WBmEmvezNK9yR7fyQerY/ZNLd9mP9B1sRVhDexcazZ4RWy3Snj+4W9+EKW 3n9w== X-Gm-Message-State: AOJu0Yw7onG/x+lKOOVe8mBtrXs6O2xJJRVF4eepWuEt5Biz/3pDcHon lgm6qnO4YkvmU8euEM0EBaa6fPyNaqvc/u1SKs3KUh5kuBopL6SzYnAlb0RCzsoxWgDhp4G6uxk / X-Google-Smtp-Source: AGHT+IEBp5M0Mhs/f7iUBO9ZmGAnJRG+FC8vNvP910HQtmIbGYXSrvop7ZIfOqY3txl1fgLdXAB3tA== X-Received: by 2002:a05:6214:1d07:b0:6d4:c27:9151 with SMTP id 6a1803df08f44-6d40c279261mr2913176d6.23.1731690293531; Fri, 15 Nov 2024 09:04:53 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d3ee8c7966sm19567776d6.88.2024.11.15.09.04.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 15 Nov 2024 09:04:53 -0800 (PST) From: Sean Devlin Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.86\)) Subject: 31.0.50; Different warnings between native-compile and native-compile-async Message-Id: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> Date: Fri, 15 Nov 2024 12:04:42 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3826.300.86) Received-SPF: pass client-ip=2607:f8b0:4864:20::f32; envelope-from=spd@toadstyle.org; helo=mail-qv1-xf32.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi folks, 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=3D/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 =E2=80=98vertico-mode=E2=80=99 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? Thanks! In GNU Emacs 31.0.50 (build 1, aarch64-apple-darwin24.2.0, NS appkit-2575.30 Version 15.2 (Build 24C5079e)) of 2024-11-15 built on beatrix.local Repository revision: 1f8fbae8df764e9d24f1b824de7369d82e36abae Repository branch: master Windowing system distributor 'Apple', version 10.3.2575 System Description: macOS 15.2 Configured using: 'configure --with-ns --with-modules --with-native-compilation --with-libgmp --with-tree-sitter --with-sqlite3 --without-imagemagick --without-dbus CPPFLAGS=3D-I/opt/homebrew/include LDFLAGS=3D-L/opt/homebrew/lib PKG_CONFIG_PATH=3D/opt/homebrew/lib/pkgconfig' Configured features: ACL GMP GNUTLS LIBXML2 MODULES NATIVE_COMP NOTIFY KQUEUE NS PDUMPER SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Dired by name Minor modes in effect: tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t buffer-read-only: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug pcmpl-unix comp comp-cstr cl-extra help-mode vertico-flat warnings vertico pcase compat info vertico-autoloads easy-mmode loaddefs-gen lisp-mnt radix-tree tar-mode arc-mode archive-mode cus-edit pp cus-start cus-load wid-edit mm-archive message sendmail yank-media rfc822 mml mml-sec epa derived epg rfc6068 gnus-util mailabbrev gmm-utils mailheader mm-decode mm-bodies mm-encode mail-utils gnutls network-stream url-cache url-http url-auth mail-parse rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr url-gw nsm puny epg-config finder-inf package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs icons password-cache json map byte-opt gv url-vars shell pcomplete time-date compile text-property-search comint subr-x ansi-osc ansi-color ring comp-run bytecomp byte-compile comp-common rx dired-aux cl-loaddefs cl-lib dired dired-loaddefs rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 236347 29747) (symbols 48 13790 0) (strings 32 64721 4130) (string-bytes 1 1850967) (vectors 16 38194) (vector-slots 8 401520 17463) (floats 8 88 82) (intervals 56 692 0) (buffers 992 20)) From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 02:41:03 2024 Received: (at 74368) by debbugs.gnu.org; 16 Nov 2024 07:41:03 +0000 Received: from localhost ([127.0.0.1]:51952 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCDQU-0003TQ-Mn for submit@debbugs.gnu.org; Sat, 16 Nov 2024 02:41:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54110) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCDQS-0003Sl-IX; Sat, 16 Nov 2024 02:41:01 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCDOF-0007nF-Hd; Sat, 16 Nov 2024 02:38:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=3ikEc1VbphV1CpkdNQMZHlyBhJzYghp7ohAQxKK3yhI=; b=ia7iXRWEnelBBaMc1TGP DBk0vHM1YBaTWhZofUYPLxV64I+m8CEIyF/FIuD9kQtn9VdJz1X4W5XU1OpotS5q/gl2hQ9WzC+ip Oy7AdayaJJYB4eyUKy806QF7yXabx4APIpF6UMxBQqn95u81GdHmpHa7mx2B51ZU8cI1TbXsjcAHV BLWYDpNGRmeRghimMya9ADpLbvn0h2xDBs0oi4tMFTTRrninijkwJgB+CPRPNzduG46PwesDDuu0w ynyX9uCTwM1NXd1ZeEQNF1FVSxN5A7IoBD8R8onjBhzblSpDi375KtRPVGNZjfVwawWcM+gHy99Vf f342oDVIDPrSwg==; Date: Sat, 16 Nov 2024 09:38:39 +0200 Message-Id: <867c93iq68.fsf@gnu.org> From: Eli Zaretskii To: Sean Devlin In-Reply-To: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> (message from Sean Devlin on Fri, 15 Nov 2024 12:04:42 -0500) Subject: Re: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async References: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74368 Cc: 74368@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) tags 74368 notabug thanks > From: Sean Devlin > 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. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 14:39:30 2024 Received: (at 74368) by debbugs.gnu.org; 16 Nov 2024 19:39:30 +0000 Received: from localhost ([127.0.0.1]:54865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCOdl-0003OI-Ij for submit@debbugs.gnu.org; Sat, 16 Nov 2024 14:39:29 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:61663) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCOdh-0003O4-LL for 74368@debbugs.gnu.org; Sat, 16 Nov 2024 14:39:28 -0500 Received: by mail-qt1-f173.google.com with SMTP id d75a77b69052e-460b04e4b1cso20934211cf.2 for <74368@debbugs.gnu.org>; Sat, 16 Nov 2024 11:39:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1731785900; x=1732390700; darn=debbugs.gnu.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=Jwnw6KLqOrsDtTKVVZBXnuhwPdQK5Smohz6Kzd0m0h8=; b=tt0rMzX7mxGcWZBE4UcsMN/kR7bh+NUfCEpvQcNoWEqh4QQNst6LuE/AStRltBH9rf sF4iQ2uJOlcPmdfJh93MUybo1qXXGmR90MzO6XjRz8wDKA+a9vjcBK3xlAYVpd/Xj4ru MGkGKpw7VIdwpFbeHjA0hb0I9t7OO0vamwAnTko2ufEWsYKvezDhr4hp3cYDOjwHNjm9 j8loAbSv9UBcVyXEHP34gu1mFPc8E8D2hSlnoSNIN9ETJhWnyIm/nxT8Gqj3ziPna2xC m40VHm1dnsZDG3eP9vIUCVxxqxwBN3aZc+MHx5EYVqozNmjvl7oivcJ8rauAn8mTwcg2 et2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731785900; x=1732390700; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Jwnw6KLqOrsDtTKVVZBXnuhwPdQK5Smohz6Kzd0m0h8=; b=Yk0MVjl27S+fFUfAKPGkFgkdq/KhRBMwyJ6jOGzjnoEknrV+3PPHpzpBSTcb3CvpkR 0h9OXo6hIU3fzHGKdf5AYppp9Ogcq5Ddj22hEZBbuDIAuGsDFvwZ6WS8mUgEDak7l3zv j1Jq0d6/Yc3poEXJCGHi6Qr0BOoxHZ3uo5qAxDenCNbxHkQ/AqjKtvSrsnJRsFRbdX+A 84orSEStQDzsdTnU8fbZ4nmCdbB7eHiiW3YX/J5boCjHLmepXVDojt29py8rDbPJlUE/ t4OduOBtH/nhyNpOs5F7WlDToa2Z4CS+oZDDKtLmXyUvPfZ2SaULBR0udmylCGlkZOlT 4FBA== X-Gm-Message-State: AOJu0YzoqQo4tWaAIuqh8TlBe0ZtB4hY/st3R3zQpcsiuo8VHX+Zybe9 eW231zqRoU8Ls5BCgE/yJ7mDXJNiPulwgP16DiPl+Su3A84VVYuYKqw/YfJ7jyNDzcnGi/qSPRd E X-Google-Smtp-Source: AGHT+IFYeCLiuyz6q00ed7QY5ovK8yB/XqBIFho4h3Axih4XYXuUNx0wmfwuk3pfFr9xrsvspkhM2Q== X-Received: by 2002:a05:622a:551:b0:461:313e:8868 with SMTP id d75a77b69052e-46363ec8c9cmr109424471cf.50.1731785899761; Sat, 16 Nov 2024 11:38:19 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4635a783c29sm35327731cf.0.2024.11.16.11.38.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 16 Nov 2024 11:38:19 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Sean Devlin Mime-Version: 1.0 (1.0) Subject: Re: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async Date: Sat, 16 Nov 2024 14:38:08 -0500 Message-Id: <93ACD03E-194E-4992-A23D-97A364F0A6F6@toadstyle.org> References: <867c93iq68.fsf@gnu.org> In-Reply-To: <867c93iq68.fsf@gnu.org> To: Eli Zaretskii X-Mailer: iPhone Mail (22C5131e) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74368 Cc: 74368@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Nov 16, 2024, at 2:38=E2=80=AFAM, Eli Zaretskii wrote: >=20 > =EF=BB=BFtags 74368 notabug > thanks >=20 >> From: Sean Devlin >> Date: Fri, 15 Nov 2024 12:04:42 -0500 >>=20 >> 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. >>=20 >> Recipe: >>=20 >> 1. mkdir /tmp/emacs-test >> 2. printf ";; -*- lexical-binding: t; -*-\n\n(vertico-mode)\n" > /tmp/ema= cs-test/test.el >> 2. HOME=3D/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 >>=20 >> There is no warning when compiling synchronously, but there is a warning >> during asynchronous compilation: >>=20 >> test.el:3:2: Warning: the function =E2=80=98vertico-mode=E2=80=99 is not k= nown to be >> defined. >>=20 >> I guess maybe the asynchronous compiler has not processed the autoloads >> from installed packages, whereas the synchronous compiler has. >>=20 >> Is this difference in behavior expected? Or is one of the compilers >> behaving incorrectly? >=20 > 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.= From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 16 16:26:57 2024 Received: (at 74368) by debbugs.gnu.org; 16 Nov 2024 21:26:58 +0000 Received: from localhost ([127.0.0.1]:55016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCQJl-0008Qk-Ih for submit@debbugs.gnu.org; Sat, 16 Nov 2024 16:26:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tCQJk-0008QY-1n for 74368@debbugs.gnu.org; Sat, 16 Nov 2024 16:26:57 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tCQJe-0003ZV-HF; Sat, 16 Nov 2024 16:26:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=KcZknKRkke9Ebo51R7ne5tzNQtIS3fUyYKz+ulsBQSA=; b=XM/g+AnPOqXhVZxJMTds VKDacSCcnxLvP0erbg4kITFKMxwyRvSMyEINZFabjNVjPi47eAd+0of4Ho9j78nVeBYpZp/03JzWS BU1JdDwnn1KPxycDvvgT5P+SFkKarXede3h9MxKV3CkgLEaOTtgLaE9mFlExdNIzWmPRl/d6u37Cs dpreFKgdV1bV7od7ss1WB/MEkt7ar6w86bBWhwlSLKmGGfNF0DMiUIKUNda9IV/7rpc30CW1gsYVI PWGik3/PSoxg42lH15zBE+QIcNOg2CCTakIa+mg/gXvIXLqXVdAAUxeRDBA1CWVK8/x/9apch20Zc Fy2ku1r9By3CEw==; Received: from acorallo by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1tCQJd-000519-Sk; Sat, 16 Nov 2024 16:26:49 -0500 From: Andrea Corallo To: Sean Devlin Subject: Re: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async In-Reply-To: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> (Sean Devlin's message of "Fri, 15 Nov 2024 12:04:42 -0500") References: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> Date: Sat, 16 Nov 2024 16:26:49 -0500 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74368 Cc: 74368@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Sean Devlin writes: > Hi folks, > > 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/ema= cs-test/test.el > 2. HOME=3D/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 =E2=80=98vertico-mode=E2=80=99 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? > > Thanks! Hi Devlin, yes this difference is expected, 'native-compile' runs the compilation in the loaded Emacs so that all the definitions of loaded packages are known to the compiler. 'native-compile-async' runs in a new fresh Emacs so all requires need to be there in the compilation unit in order to let the compiler be able to load the definitions. We have also some doc in (info "(elisp) Native-Compilation Variables") which goes like this: A common cause for asynchronous native-compilation to produce warnings is compiling a file that is missing some =E2=80=98require=E2= =80=99 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. Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 22 11:33:53 2024 Received: (at 74368) by debbugs.gnu.org; 22 Nov 2024 16:33:53 +0000 Received: from localhost ([127.0.0.1]:55285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEWbR-0002h1-0g for submit@debbugs.gnu.org; Fri, 22 Nov 2024 11:33:53 -0500 Received: from mail-qv1-f52.google.com ([209.85.219.52]:55581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEWbO-0002gt-KK for 74368@debbugs.gnu.org; Fri, 22 Nov 2024 11:33:51 -0500 Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6d413def36cso15358356d6.3 for <74368@debbugs.gnu.org>; Fri, 22 Nov 2024 08:33:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20230601.gappssmtp.com; s=20230601; t=1732293170; x=1732897970; darn=debbugs.gnu.org; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=3Q73evEJ2k2LHjqHW2/bXZJATf7EnI+erbyzBp0J/UM=; b=jut0sIxbFfz0GrttZezmPJdec+bZFS5oaym9MQrsuiBHbSYrYi2B35IsoBoU5k37xQ hvq6YkHcOgdlU1qaSmBbMpQ564vO/mLq1EpFgAPF2eY4zPLZzruRFiLOnJjvhi+Idbi7 KmpUpri824NBGY2zAl/LOUVux5HnAiaZsBzere2ruT6UZeZMs6yGfPbxHAjGZPW7x4co xSh5YJ8SK22SxrZ1DiNzkECNt0uUogfPLPQb7lOLLdblwElcdyILVFh8CjfxzYUemzX/ 3QhmGJT2gQdB0n7tf/FRUdUGMisW8m967qqiXJXKAtr76F3h7RTqhzQK0D2qQs7pL/eR EK3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732293170; x=1732897970; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3Q73evEJ2k2LHjqHW2/bXZJATf7EnI+erbyzBp0J/UM=; b=JCaQK9XzhGk0JrM3pi13fkeHvT3ktHq7Y1UPWm0GJwnTkosKaYUE53hwkER25B+ar8 nawxYC5FOg5/Zxcff75W3tPGzoxvWkdYVtNtaQ94p7eO9Vu0wRSY+5VHuQCdzjHqiAXA cQ5jwIK8n9oSiYHFoqWzaCFZ2LePA9N4W2w2jOXD5j2Jsl4KSC7VApXuaiqhHIhXspKK VXr26pNkfQbnvDTFFzJwAabmnnENTlsFXAG9y5vbxrCqXL1BHaizdDHO9F9Ssry/94Db WtFZSsnDmS+/cumSv2/xt1p3nZ584rMq+e6+JsUv4atXYExGsD1TFbaSq9dcUVVYIZ/s oKOw== X-Gm-Message-State: AOJu0YyS0kkS7zMXUa1UGQzOHMNHSLkPk//UOb9dBdNlR4TmQ4GmaylQ k97jBZudW0JUa5VqMtRWFD9KHuguc1iGzcA0q9wpCb+5VQTv8gMbA4xuKCkspIVum/hPkyjiI8p hBek= X-Gm-Gg: ASbGnctLO9vU7ahl9R5s6xaKcuTJeHCqQ+QP7ZaxOjFOzWDoUvp+KcP8vsxQCh2Sqqj bNyjUSxoMaxSs6r1AJtqunSJL/ihXNfLz0SXPNZrLYWJnLQ8vvWmDQGN/OPeiEXu3gZBay8fpl/ RlVNano1HM1Vwmp2FaG5ZisEenzJbM9bVBSCZls4EM1LjgVx5hCKbVMTkdH66ZVY4EKVWG68e1T Xczs80UObf552odrezIVNCjI3CRkE+434E5p4i29HHKL2j6vkRQvV3WPsRvNVU73E+m X-Google-Smtp-Source: AGHT+IERCyfU++ihR7ZqiWJ5s4s4ew4axIg4EQebdngyAg8RQpRD2SH57uOdZf1iRo/tiP1fwHgA8Q== X-Received: by 2002:a05:6214:19c6:b0:6d4:2044:e941 with SMTP id 6a1803df08f44-6d450ed3ad4mr59974206d6.18.1732293169973; Fri, 22 Nov 2024 08:32:49 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d451b66279sm11527616d6.122.2024.11.22.08.32.49 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Nov 2024 08:32:49 -0800 (PST) From: Sean Devlin Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_0AF3B231-03E3-4A2C-8295-DAB9EEC71E71" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.300.87.2.1\)) Subject: Re: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async Date: Fri, 22 Nov 2024 11:32:39 -0500 In-Reply-To: To: Andrea Corallo References: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> X-Mailer: Apple Mail (2.3826.300.87.2.1) X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 74368 Cc: 74368@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --Apple-Mail=_0AF3B231-03E3-4A2C-8295-DAB9EEC71E71 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Nov 16, 2024, at 4:26=E2=80=AFPM, Andrea Corallo = wrote: >>=20 >=20 > Hi Devlin, >=20 > yes this difference is expected, 'native-compile' runs the compilation > in the loaded Emacs so that all the definitions of loaded packages are > known to the compiler. 'native-compile-async' runs in a new fresh = Emacs > so all requires need to be there in the compilation unit in order to = let > the compiler be able to load the definitions. >=20 > We have also some doc in (info "(elisp) Native-Compilation Variables") > which goes like this: >=20 > A common cause for asynchronous native-compilation to produce > warnings is compiling a file that is missing some =E2=80=98require=E2= =80=99 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. >=20 > Regards >=20 > Andrea I see. Thanks for the explanation and the documentation reference! Sean= --Apple-Mail=_0AF3B231-03E3-4A2C-8295-DAB9EEC71E71 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On= Nov 16, 2024, at 4:26=E2=80=AFPM, Andrea Corallo = <acorallo@gnu.org> wrote:


Hi = Devlin,

yes this difference is = expected, 'native-compile' runs the compilation
in the loaded Emacs so that all the = definitions of loaded packages are
known = to the compiler.  'native-compile-async' runs in a new fresh = Emacs
so all requires need to = be there in the compilation unit in order to let
the compiler be able to load the = definitions.

We have also some doc in = (info "(elisp) Native-Compilation Variables")
which goes like this:

   A common cause for = asynchronous native-compilation to produce
    warnings is compiling a file that = is missing some =E2=80=98require=E2=80=99 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.

Regards

 Andrea

I see. = Thanks for the explanation and the documentation = reference!

Sean
= --Apple-Mail=_0AF3B231-03E3-4A2C-8295-DAB9EEC71E71-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 23 07:38:24 2024 Received: (at 74368-done) by debbugs.gnu.org; 23 Nov 2024 12:38:24 +0000 Received: from localhost ([127.0.0.1]:57047 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEpP6-0004b1-AE for submit@debbugs.gnu.org; Sat, 23 Nov 2024 07:38:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tEpP4-0004an-2W for 74368-done@debbugs.gnu.org; Sat, 23 Nov 2024 07:38:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tEpOx-00086O-Lm; Sat, 23 Nov 2024 07:38:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ElsyW9dbsvIH2HVTfGkXm6pIFKYk6xFE8NhxLGP8sk4=; b=qOjM8xgW3CXRA/td2EFM DesNmb4z5FdNWUx7ajXnqjXvFdSlkRgHA12hDdR07njgHdaSHHqrPFB62IXVCrtuugw5vtQMO0Ll/ nwf0KsbhhUPhzTgZ/IPRn1RilzDprX079EYvFReKmhKkwFlSW7dptqpgUqRB22FgKfFUewboSfIXo qdfWlzjCGg9lhH5JwMVnXL4ru7uFAadYzvfUYuVIsjQimiAzM7iO6mm4RhfFzomip2DaomGAcbt8K J6BXLpVzfcx6LuZBFo2fKwC+8XIKmZrPlV95Lx2EkeBmH5z9aXm6MnKWDfmbugZmG4EPE3behoXOr Ci/6qr8k6WPedw==; Date: Sat, 23 Nov 2024 14:37:59 +0200 Message-Id: <86zflqktw8.fsf@gnu.org> From: Eli Zaretskii To: Sean Devlin In-Reply-To: (message from Sean Devlin on Fri, 22 Nov 2024 11:32:39 -0500) Subject: Re: bug#74368: 31.0.50; Different warnings between native-compile and native-compile-async References: <39041F0A-3CD1-4665-9FE0-851334B3B37F@toadstyle.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 74368-done Cc: acorallo@gnu.org, 74368-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 74368@debbugs.gnu.org > From: Sean Devlin > Date: Fri, 22 Nov 2024 11:32:39 -0500 > > On Nov 16, 2024, at 4:26 PM, Andrea Corallo wrote: > > Hi Devlin, > > yes this difference is expected, 'native-compile' runs the compilation > in the loaded Emacs so that all the definitions of loaded packages are > known to the compiler. 'native-compile-async' runs in a new fresh Emacs > so all requires need to be there in the compilation unit in order to let > the compiler be able to load the definitions. > > We have also some doc in (info "(elisp) Native-Compilation Variables") > which goes like this: > > A common cause for asynchronous native-compilation to produce > warnings is compiling a file that is missing some ‘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. > > Regards > > Andrea > > I see. Thanks for the explanation and the documentation reference! I'm therefore closing this bug. From unknown Fri Aug 15 16:17:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 22 Dec 2024 12:24:14 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator