From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#57627: 29.0.50; [native-compilation] cl-loaddefs.el recompiled on startup Date: Sat, 15 Oct 2022 10:19:57 -0400 Message-ID: References: <87bkrsr1g2.fsf@gnus.org> <875yi0qz5b.fsf@gnus.org> <83sfl4ihfo.fsf@gnu.org> <87mtbcp774.fsf@gnus.org> <877d2e5ba1.fsf@gnus.org> <87czc4v5id.fsf@gnus.org> <874jxfsv9o.fsf@gnus.org> <874jw6d6cl.fsf@gnus.org> <871qr95r8z.fsf@gnus.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30450"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: germanp82@hotmail.com, 57627@debbugs.gnu.org, Eli Zaretskii , Andrea Corallo To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 15 16:21:10 2022 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 1oji2I-0007k6-Hn for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 16:21:10 +0200 Original-Received: from localhost ([::1]:44450 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oji2H-0004FO-Et for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 10:21:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oji2B-0004Ez-6V for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 10:21:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oji2A-0003aY-Te for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 10:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oji2A-0000JW-LT for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57627 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 57627-submit@debbugs.gnu.org id=B57627.16658436091093 (code B ref 57627); Sat, 15 Oct 2022 14:21:02 +0000 Original-Received: (at 57627) by debbugs.gnu.org; 15 Oct 2022 14:20:09 +0000 Original-Received: from localhost ([127.0.0.1]:42344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oji1I-0000HZ-TL for submit@debbugs.gnu.org; Sat, 15 Oct 2022 10:20:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oji1G-0000Gz-1J for 57627@debbugs.gnu.org; Sat, 15 Oct 2022 10:20:07 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id A2C194407EC; Sat, 15 Oct 2022 10:20:00 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E8F8D440802; Sat, 15 Oct 2022 10:19:58 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665843598; bh=9wOdjLnLJdfak+5YRlhkXT91l4RvHNBjvxJ/ZW7/Qgk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=cR0+Z8y3Ilve/p3JyV/5mLVXdJ11Ur6IX8KrPw42p3lSm0fUHMyzGybVZQLstqee0 wLpNhzrjXDJJ1PcX+t3zbceAZYNaMN6RE2uQ4lSyjZn+35sRLtCijJGBYCoJiQpgT1 UH9dYPoIBPWhGJi4mOSTsbMB3C19ojfmNGICMK4YVxDL+A8UBb5sgUJU+yQvV0qAU3 jxWoYAGZM0IK56PK0SdYZJ90D10H/vWu9TVtuRqjIcnmbBGh7y1WhZWuIUPxxo3whw y3VCbtoptyApMw74hrrnv5huc6Ee0lkYRxVpjxlrtArcBcfVqPWhrB2w5n3xZJ+2qj z3IAtoNk8BOTw== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8F30A120796; Sat, 15 Oct 2022 10:19:58 -0400 (EDT) In-Reply-To: <871qr95r8z.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 15 Oct 2022 12:13:32 +0200") 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" Xref: news.gmane.io gmane.emacs.bugs:245560 Archived-At: Re-reading this discussion what I see is two different options, neither of which is significantly better than the other. So the motivation to change is not very high. Stefan Lars Ingebrigtsen [2022-10-15 12:13:32] wrote: > Stefan Monnier writes: > >> After spending many milliseconds thinking about it, my conclusion is >> that the bytecompiler should add a little code snippet like >> (puthash load-file-name t comp--no-native-compile) in the >> file if `no-native-compile` was specified. So it then be easy for the >> lazy native compilation to detect that it should skip this file (since >> lazy native compilation is triggered after loading the file) by just >> consulting `comp--no-native-compile`. >> >> For that, there's no need to change the way `no-native-compile` is specified. > > True, but it's kinda hacky, and if possible, I'd like to avoid adding > more hacks in this area... > >>> That is, in this case, we'd say >>> >>> (pragma 'no-native-compile) >>> >>> somewhere in the file. >> >> I guess that could work for `no-native-compile`, indeed. But if you ask >> to native compile this file and the pragma is halfway down the file, >> what happens? > > Yes, that's no good. Uhm... we could make a rule that all `pragma's > have to appear as the first form(s) in a Lisp file? And error out if > somebody tries to add a `pragma' later in the file. > > I think that would make sense in general -- we're trying to express > something about the file as a whole, after all. > >>> We could have >>> >>> (pragma 'dynamic-binding) >> >> I guess this one could work (of course, it'd have to be at top-level), >> and we could switch back&forth within the same file (yuck!). >> >> But if we allow such `pragma` to be output by macros, then it becomes >> tricky for `eval-region` to reliably decide which dialect to use. > > Hm, yes... But we have the same issue today, don't we? That is > > (progn > (pop-to-buffer "*foo*") > (emacs-lisp-mode) > (insert ";;; -*- lexical-binding: t -*-\n(message \"Lex: %s\" lexical-binding)") > (eval-region (pos-bol) (point))) > > Well, OK, that's the same result with point-min, but... > >> So we could allow such `pragma`, but we'd likely end up restricting its >> syntax so we're able to find it with something like a regexp search, so >> in the end it's not clear what's the advantage over >> file-local variables. > > If they have to be the first forms, there may be some advantages...