unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Andrea Corallo <akrl@sdf.org>
Cc: 40838@debbugs.gnu.org
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	[thread overview]
Message-ID: <87o8qk39o5.fsf@localhost> (raw)
In-Reply-To: <xjfimgt57a4.fsf@sdf.org>

> 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'.

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 <akrl@sdf.org> writes:

> Ihor Radchenko <yantar92@gmail.com> 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). 
>> 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-org).
>>
>> 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: ‘N/A’
>> (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
>
> -- 
> akrl@sdf.org

-- 
Ihor Radchenko,
PhD,
Center for Advancing Materials Performance from the Nanoscale (CAMP-nano)
State Key Laboratory for Mechanical Behavior of Materials, Xi'an Jiaotong University, Xi'an, China
Email: yantar92@gmail.com, ihor_radchenko@alumni.sutd.edu.sg





  parent reply	other threads:[~2020-05-19  3:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-25  8:14 bug#40838: 28.0.50; [feature/native-comp] Function overrides in init.el are not honored after deferred compilation Ihor Radchenko
2020-04-25  9:16 ` Andrea Corallo
2020-04-25 14:26   ` Andrea Corallo
2020-04-26  4:55     ` Ihor Radchenko
2020-04-26  8:59       ` Andrea Corallo
2020-04-28 14:40         ` Ihor Radchenko
2020-04-28 15:03           ` Andrea Corallo
2020-05-18 15:23             ` Ihor Radchenko
2020-05-18 20:15               ` Andrea Corallo
2020-05-18 21:01                 ` Andrea Corallo
2020-05-19  3:06                 ` Ihor Radchenko [this message]
2020-05-23 14:13                   ` Ihor Radchenko
2020-05-23 14:39                     ` Andrea Corallo
2020-05-23 15:23                       ` Ihor Radchenko
2020-06-02  7:27                         ` Andrea Corallo
     [not found]                           ` <87zh7ltgc7.fsf@localhost>
2020-07-28  7:24                             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-07-28  9:06                               ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o8qk39o5.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=40838@debbugs.gnu.org \
    --cc=akrl@sdf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).