unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Aaron Jensen <aaronjensen@gmail.com>
Cc: Andrew Whatson <whatson@gmail.com>, 46617@debbugs.gnu.org
Subject: bug#46617: 28.0.50; nativecomp: native compile cache is not invalidated when file is re-byte compiled and changes
Date: Mon, 29 Mar 2021 08:14:55 +0000	[thread overview]
Message-ID: <xjf5z1ape9s.fsf@sdf.org> (raw)
In-Reply-To: <CAHyO48wMwQP1ioKrmyNcovTY4_7QcwhvB7_a67g_PgWsUEGr1A@mail.gmail.com> (Aaron Jensen's message of "Sun, 28 Mar 2021 13:24:49 -0500")

Aaron Jensen <aaronjensen@gmail.com> writes:

> On Fri, Mar 26, 2021 at 2:54 AM Andrea Corallo <akrl@sdf.org> wrote:
>>
>> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
>> text editors" <bug-gnu-emacs@gnu.org> writes:
>>
>> > Aaron Jensen <aaronjensen@gmail.com> writes:
>> >
>> >> On Sun, Mar 21, 2021 at 3:54 PM Andrea Corallo <akrl@sdf.org> wrote:
>> >>>
>> >>> Andrea Corallo via "Bug reports for GNU Emacs, the Swiss army knife of
>> >>> text editors" <bug-gnu-emacs@gnu.org> writes:
>> >>>
>> >>>
>> >>> Okay I've added `comp-lookup-eln' son now the user can search if a
>> >>> certain .eln is in reach in `comp-eln-load-path' for a given .el.
>> >>>
>> >>> So now one can use the following to force a native load.
>> >>>
>> >>> (load (comp-lookup-eln ".../foo.el"))
>> >>
>> >> Okay, and that would return nil if it's not native compiled, which
>> >> would be their cue to native compile it, yes?
>> >
>> > Yes `comp-lookup-eln' will return nil if the eln is not found.
>> >
>> >> That's nice to be able
>> >> to force load it.
>> >>
>> >> Without doing the modification date stuff you mentioned or purge
>> >> before byte compile, native compilation ends up having to be a concern
>> >> of anything that's doing byte compiling, which is unfortunate.
>> >
>> > Say anything that's doing byte compiling deliberately capturing
>> > environment values yes.
>> >
>> >   Andrea
>>
>> I've reintroduced the file timestamp check on the eln files being loaded
>> with 79b8b6ca45.  This should protect us from loading stale eln that
>> captured some stale env during compilation.
>
> What does it compare the timestamp of the eln to? It doesn't appear
> that it's the elc, which I believe is the only thing that would help
> with the issue we're seeing in straight.el. Is it the el or something
> else?

Compares against the .elc.

> A related issue I've found is that now when you load an elc
> explicitly, it triggers a native compile for that file regardless of
> whether or not one has already been done.

Do you have a reproducer I can look at?

> One general question is, is the eln a compilation of the elc or the
> el?

Native compilation uses as input always the source (.el) file.

Thanks

  Andrea





  reply	other threads:[~2021-03-29  8:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18 15:42 bug#46617: 28.0.50; nativecomp: native compile cache is not invalidated when file is re-byte compiled and changes Aaron Jensen
2021-02-25  5:48 ` Aaron Jensen
2021-02-25  9:04   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-02-25 16:09     ` Aaron Jensen
2021-02-25 17:01       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-21 17:27       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-21 17:36         ` Aaron Jensen
2021-03-21 17:59           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-21 20:54             ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-22  0:44               ` Aaron Jensen
2021-03-22  7:57                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-26  7:54                   ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-28 18:24                     ` Aaron Jensen
2021-03-29  8:14                       ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-03-29 16:26                         ` Aaron Jensen
2021-03-31 10:22                           ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-31 16:30                             ` Aaron Jensen
2021-03-31 17:58                               ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-04-07 18:48                                 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=xjf5z1ape9s.fsf@sdf.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=46617@debbugs.gnu.org \
    --cc=aaronjensen@gmail.com \
    --cc=akrl@sdf.org \
    --cc=whatson@gmail.com \
    /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).