From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#40838: 28.0.50; [feature/native-comp] Function overrides in init.el are not honored after deferred compilation Date: Mon, 18 May 2020 20:15:31 +0000 Message-ID: References: <87zhb0q8wi.fsf@localhost> <87lfmidexg.fsf@localhost> <87mu6v4qss.fsf@localhost> <87wo592rne.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="84840"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: 40838@debbugs.gnu.org To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 18 22:35:32 2020 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 1jamTy-000Lvf-Pc for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 22:35:30 +0200 Original-Received: from localhost ([::1]:54034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jamTx-0001kh-SW for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 16:35:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59090) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jamB8-0006qV-Bj for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 16:16:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36792) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jamB7-00035Z-Q9 for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 16:16:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jamB7-00086L-Mh for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 16:16:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 May 2020 20:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40838 X-GNU-PR-Package: emacs Original-Received: via spool by 40838-submit@debbugs.gnu.org id=B40838.158983293431103 (code B ref 40838); Mon, 18 May 2020 20:16:01 +0000 Original-Received: (at 40838) by debbugs.gnu.org; 18 May 2020 20:15:34 +0000 Original-Received: from localhost ([127.0.0.1]:48338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jamAg-00085b-05 for submit@debbugs.gnu.org; Mon, 18 May 2020 16:15:34 -0400 Original-Received: from mx.sdf.org ([205.166.94.20]:52755) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jamAe-00085T-Ov for 40838@debbugs.gnu.org; Mon, 18 May 2020 16:15:33 -0400 Original-Received: from sdf.org (ma.sdf.org [205.166.94.33]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 04IKFVxX021567 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Mon, 18 May 2020 20:15:31 GMT Original-Received: (from akrl@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 04IKFVnO028291; Mon, 18 May 2020 20:15:31 GMT In-Reply-To: <87wo592rne.fsf@localhost> (Ihor Radchenko's message of "Mon, 18 May 2020 23:23:49 +0800") 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:180559 Archived-At: Ihor Radchenko writes: >> thanks this is appreciated because I haven't managed to reproduce it >> myself. > > Finally, I found some reproducible example. > straight.el redefines some org functions before loading org. > It is done in straight--fix-org-function (org-git-version and > org-release are redefined).=20 > The redefined version works with org.elc, but somehow get overridden > when org.eln is loaded (in my case, the loading is triggered by elfeed-or= g). > > Steps to reproduce: > > 1. Use the attached file to load emacs. No errors should appear. > 2. Wait until org is native-compiled. > 3. Restart emacs. The following errors appears > (straight--fix-org-function supposed to be a workaround for this error): > > Error (use-package): elfeed-org/:catch: Invalid version syntax: =E2=80=98= N/A=E2=80=99 > (must start with a number) > > 4. Delete org.eln > 5. Restart emacs. The error disappears. Okay I think I've an idea of what is going on here. straight given wants to build org in a way org is not made for is hacking around the problem predefining in the compilation environment `org-release' and `org-git-version'. When org.el is loaded is executing at top level the expansion of `org-check-version' that is supposed to define these two functions, given are already defined by straight.el we should fall in the first if clause an the hacked functions remains. When the eln are compiled by deferred-compilation no-one is hacking the definition of these two functions in the way straight.el would like and so the trouble raise. In summary this is not a problem of the deferred compilation mechanism but is an hack that is not working for this case. To mitigate this I've added a new customize you can use to define those functions (or whatever) into the compiler environment of the async compilation workers, is called `comp-async-env-modifier-form'. 2ac6194585 * Add new customize `comp-async-env-modifier-form' (Bug#40838) I'm for closing this. Bests Andrea --=20 akrl@sdf.org