From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Ihor Radchenko 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: Tue, 19 May 2020 11:06:50 +0800 Message-ID: <87o8qk39o5.fsf@localhost> 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="12304"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 40838@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 19 05:12:10 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 1jasfp-000371-Fk for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 May 2020 05:12:09 +0200 Original-Received: from localhost ([::1]:41080 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jasfo-000700-HV for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 18 May 2020 23:12:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49900) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jasfi-0006zt-8p for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 23:12:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37249) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jasfh-000831-Vu for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 23:12:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jasfh-0003Pm-S0 for bug-gnu-emacs@gnu.org; Mon, 18 May 2020 23:12:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ihor Radchenko Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 May 2020 03:12: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.158985789913088 (code B ref 40838); Tue, 19 May 2020 03:12:01 +0000 Original-Received: (at 40838) by debbugs.gnu.org; 19 May 2020 03:11:39 +0000 Original-Received: from localhost ([127.0.0.1]:48795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jasfJ-0003P0-Tt for submit@debbugs.gnu.org; Mon, 18 May 2020 23:11:38 -0400 Original-Received: from mail-pg1-f172.google.com ([209.85.215.172]:33782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jasf4-0003OQ-6d for 40838@debbugs.gnu.org; Mon, 18 May 2020 23:11:37 -0400 Original-Received: by mail-pg1-f172.google.com with SMTP id s10so3494824pgm.0 for <40838@debbugs.gnu.org>; Mon, 18 May 2020 20:11:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=GUc2zatoO1K7Cjpb8n6UlAIgncwj7FXmVE7XvPSXz/c=; b=Jsy6+5zNAutlDPiwg9WNybKb7Ny2fqQlrWJn8PriBJISGD1BOVQFiTknvAigXMKQEa 2hcpFfNZK1ky55d0P44hOzEPKDCHPPL3/cCkMxfOPqJp8uHdH4UImFnqJzKD8Ji8l8sG YHV+W5L70YHwQNwkydlzDX0mg8Bm6YM+H96ad7EzqyVlgAYKQ9VMEhI1GjvH2ki3/E24 s+lOSQ6OhhgmJXyEzGnz1uGwN/ODM7/Gp/rd2CxEgmMQCv2+NVSmHOWI00BpeFfDi6ru jFqxfcOjhqtfC5cd9WfRpJeaWDRArNHeZnHrHg+IAPgKABy1bGPkYrxUymwweQVUS7mW Bo3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=GUc2zatoO1K7Cjpb8n6UlAIgncwj7FXmVE7XvPSXz/c=; b=mqWwy2SlJLh4gPTu0E2MX4vf9ILhNRgFGLghjE+/NizOCd59/73x8BXfhlhn8sKcq2 /nXxybOwOopBn/liiXYOl3ukf2BmEuqbxDUxzCS4FIXlmjxT6UZCd28NPyLfLbqZ/mxZ b8EPi61pRE+Ad4r5huoP/8a5Km9fRULAp3iQQ490uFRGhtPDq9YHvbp+x6fL5M3KSieY 2fd/uQTLUWHMfomh3veEA6JiRI6H821Sy4m9rX304U1oIX9QahvDgnUxQb1vSuagJGrM 8d3cVRIB+/HXUZYO53ZjNZyJcc5Ft1gknd0Y35W02CYu/YAWZZ7Aw7kHOldwqT4yp5AV R/qA== X-Gm-Message-State: AOAM532RRbHBjczs/SZK+2Me0eB7UaIJz2I5v/yr047BnO971G9qoqbT kju0tEr8CRrawqXOiD1+ydY= X-Google-Smtp-Source: ABdhPJy7sglxwHpeAL7MfE2k7K9AYWxttetilvXws0bbNBhj2pl1b7r20xlLJ6PWH23Q4y5QziFX/w== X-Received: by 2002:a65:4488:: with SMTP id l8mr8052766pgq.327.1589857876422; Mon, 18 May 2020 20:11:16 -0700 (PDT) Original-Received: from localhost (97.151-89-23.rdns.scalabledns.com. [23.89.151.97]) by smtp.gmail.com with ESMTPSA id m188sm9966526pfd.67.2020.05.18.20.11.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 20:11:15 -0700 (PDT) In-Reply-To: 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:180577 Archived-At: > In summary this is not a problem of the deferred compilation mechanism > but is an hack that is not working for this case. >=20 > 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'. If this is what is happening with straight.el, then my recipe is not actually reproducing my initial bug report. I have other cases when functions redefined in my config are overridden by initial definition when .eln is loaded. I think that I still need to investigate for a real recipe then. Best, Ihor Andrea Corallo writes: > 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-o= rg). >> >> 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= =98N/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 --=20 Ihor Radchenko, PhD, Center for Advancing Materials Performance from the Nanoscale (CAMP-nano) State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong U= niversity, Xi'an, China Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg