From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#73303: 30.0.91; Native compiler repeatedly interrupts at random moments Date: Mon, 16 Sep 2024 21:42:24 +0300 Message-ID: <867cbbcuen.fsf@gnu.org> References: <87wmjbmpnt.fsf@moondust.awandering> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36086"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 73303@debbugs.gnu.org To: "N. Jackson" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 16 20:43:13 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sqGgr-0009Bt-6S for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Sep 2024 20:43:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sqGgV-0005Y7-DW; Mon, 16 Sep 2024 14:42:51 -0400 Original-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 1sqGgT-0005XL-Ea for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 14:42:49 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sqGgT-0001r7-4x for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 14:42:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-version:References:In-Reply-To:From:Date:To:Subject; bh=D8mKubav/FE05A//33azfHQr4yBGflUUit44sn3yskA=; b=G0h9AfpbKnhlrREIfbf6+dO/ZhOOfIagqbQOPB1loxv5W6thzYE/R3TUyd5PasxycAugrzOo7sDS100Cq4ghLFbJ3hzDFl7rXF7+yxJUD0JOK467IM0fnxrneCSD6b++6/8vcaaDuRa3zn9SZGT8G1h5TaSvKYtcffce/M80ttdhBSJcIg4y9x9uRGcJmY10MgcjeYZc6wUYIVKwkx2x0wbEVyB/K06zMNUpba/WXveAs0RYYBjUZnCdbCF78YpcSLSxqU0qDGU6O8mf+zTmjCssd5B+wffSx34WH1vhKfAuf/NpzRhjavmqzoX73dCij1Y26c8Mg2PxKolYSqRkHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sqGgg-0000nP-Nw for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 14:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Sep 2024 18:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73303 X-GNU-PR-Package: emacs Original-Received: via spool by 73303-submit@debbugs.gnu.org id=B73303.17265121683025 (code B ref 73303); Mon, 16 Sep 2024 18:43:02 +0000 Original-Received: (at 73303) by debbugs.gnu.org; 16 Sep 2024 18:42:48 +0000 Original-Received: from localhost ([127.0.0.1]:53254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqGgS-0000mj-2T for submit@debbugs.gnu.org; Mon, 16 Sep 2024 14:42:48 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39200) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sqGgP-0000mT-TZ; Mon, 16 Sep 2024 14:42:46 -0400 Original-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 1sqGg6-0001qc-N7; Mon, 16 Sep 2024 14:42:26 -0400 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=D8mKubav/FE05A//33azfHQr4yBGflUUit44sn3yskA=; b=VG6Pk6UrAEHzEacyXyUW CIwldQL05TU0qUU/66fu36JrVIPmAXDIeXAPBOKLARB4vuzW3JytQys8m4yFxKosGBw31AbC0uJrW LJKnRa0vieyVah0y+gYek73nhXGYe8QpnrKSz20HbjevQh3JGOceyyctxK+LYVs55SaxD9laPWWzP 4Qq68+NhS/96On+WUVjgi5mtHfZ2kwMii2L+use80o0YawN+ABtvfObKvHI2PbFR1CnGlqk1M88ne 76sty6SAPWu3srzSAXy2/WEgYYIeEqFezMzE5ZLIieI3IdyPVs6kCUDhFpZJVR420WzgqXPhqjZO5 KukEUFO+rz3m2w==; In-Reply-To: <87wmjbmpnt.fsf@moondust.awandering> (njackson@posteo.net) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:291906 Archived-At: tags 73303 notabug thanks > From: "N. Jackson" > Date: Mon, 16 Sep 2024 18:14:46 +0000 > > > Since building Emacs 30.0.91, I have repeatedly been interrupted in > my work by warnings from the native compiler. > > A few examples of the warnings are: > > Warning (native-compiler): ~/.config/emacs/modules/cdlatex.el:1025:26: Warning: the function ‘reftex-what-environment’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:161:10: Warning: the function ‘python-nav-end-of-block’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:138:8: Warning: the function ‘python-util-forward-comment’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:94:4: Warning: the function ‘python-nav-beginning-of-statement’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:92:4: Warning: the function ‘python-nav-end-of-statement’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:62:31: Warning: the function ‘python-syntax-context’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:39:39: Warning: the function ‘python-indent’ is not known to be defined. > Warning (native-compiler): python-el-fgallina-expansions.el:37:40: Warning: the function ‘python-info-ppss-context’ is not known to be defined. These warnings usually mean that the offending Lisp file lacks some 'require's. JIT native compilation runs in a separate Emacs session, which only loads the file it compiles, so any missing 'require's or autoloading cookies trigger these warnings, whereas when the same packages are loaded into your main Emacs session, they can benefit from packages loaded earlier in the session. IOW, these are minor bugs in the compiled files which need to be fixed in those files and by their respective developers. > This behaviour is quite annoying and I wonder if it would not be > better if the native compiler compiled everything when Emacs is > started and reported all the errors/warnings then. You can disable these warnings if you are annoyed by them. They are just warnings, and will not usually cause any problems when using the compiled code. See native-comp-async-report-warnings-errors. You can cause these compilations to happen at the beginning of your Emacs session if you change your init files such that Emacs loads all these files. JIT native compilation is triggered by loading a .elc file that doesn't yet have a corresponding .eln file, so by loading them at the beginning, you will force Emacs to native-compile them all at that time. In any case, Emacs compiles each Lisp file just once, so you should only see these when you start a new Emacs version for the first time. > I supoose that might increase Emacs startup time which for some > users would be unacceptable, but maybe it could happen the first > time Emacs is started and after updating packages and after changing > configuration. It shouldn't increase startup time because the compilation is run in separate processes, and those use other CPU cores. Emacs doesn't wait for the compilation to end before using a package; it uses the byte code until the native compilation ends, and then loads the native-compiled code when the compilation ends to replace the byte code. I see no bug in what you describe.