unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrea Corallo <akrl@sdf.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: acm@muc.de, emacs-devel@gnu.org
Subject: Re: How does one find out what file a library has been loaded from?
Date: Tue, 02 Aug 2022 14:13:58 +0000	[thread overview]
Message-ID: <xjfr11yka1l.fsf@ma.sdf.org> (raw)
In-Reply-To: <83bkt226a7.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 02 Aug 2022 15:12:32 +0300")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: acm@muc.de, emacs-devel@gnu.org
>> Date: Tue, 02 Aug 2022 08:43:53 +0000
>> 
>> > Other than that only note I've is that (in 'maybe_swap_for_eln1') we do
>> > reject the .eln file if it's younger than the corresponding .elc one.  I
>> > think we should mimic this as well here no?
>> 
>> I do realize now this is probably not a real case as: if (in
>> 'maybe_swap_for_eln1') we reject the eln while loading because older
>> than the elc we give up entirely on loading native code, even if might
>> be available in another directory down in `native-comp-eln-load-path'.
>> So your code should be just fine in this respect.
>
> I'm not sure I understand: in what sense do we "give up entirely on
> loading native code"?  I don't see in maybe_swap_for_eln1 or in
> maybe_swap_for_eln anything that would mean something like that.  All
> I see is that we continue using the .elc file if the timestamp test
> fails.

Yes correct, that's what I meant, we give up for this specific .elc file
instead of keep on searching.

> So in that case, my changes would return the .eln file even
> though it was not actually loaded.

Ops that's correct, I miss-read your code sorry.

> We could document this corner use case, and say that we return the
> .eln file even if it's outdated, or we could add the timestamp test
> you suggested, and return the .elc file if the test fails.

I think would be nicer to have the timestamp test.

Still if the filesystem state changes the result could be incorrect, ex
one could even remove the .eln file and even if the definition is coming
from it we'd return the .elc.  Perhaps we should document this?

Thanks

  Andrea



  reply	other threads:[~2022-08-02 14:13 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 10:52 How does one find out what file a library has been loaded from? Alan Mackenzie
2022-07-19 12:39 ` Eli Zaretskii
2022-07-19 15:01   ` Alan Mackenzie
2022-07-19 15:32     ` Andrea Corallo
2022-07-24 16:07       ` Eli Zaretskii
2022-07-24 17:46         ` Andrea Corallo
2022-07-31 12:52           ` Eli Zaretskii
2022-08-01  9:23             ` Andrea Corallo
2022-08-02  8:43               ` Andrea Corallo
2022-08-02 12:12                 ` Eli Zaretskii
2022-08-02 14:13                   ` Andrea Corallo [this message]
2022-08-03 14:19                     ` Eli Zaretskii
2022-08-01 19:31             ` Alan Mackenzie
2022-08-03 14:16               ` Eli Zaretskii
2022-07-19 15:50     ` Eli Zaretskii
2022-07-19 17:07       ` Alan Mackenzie
2022-07-19 19:13         ` Eli Zaretskii
2022-07-20 11:47           ` Alan Mackenzie
2022-07-20 15:31             ` Stefan Monnier
2022-07-20 20:34             ` Alan Mackenzie
2022-07-21  6:13               ` Eli Zaretskii
2022-07-21 17:37                 ` Alan Mackenzie
2022-07-21 17:52                   ` Stefan Monnier
2022-07-21 18:24                     ` Alan Mackenzie
2022-07-21 18:37                       ` Stefan Monnier
2022-07-21 21:03                         ` Alan Mackenzie
2022-07-21 23:15                           ` Stefan Monnier
2022-07-21 17:53                   ` Eli Zaretskii
2022-07-21 20:39                     ` Alan Mackenzie
2022-07-23 10:11                       ` Eli Zaretskii
2022-07-24 11:27                         ` Alan Mackenzie
2022-07-24 12:16                           ` Eli Zaretskii
2022-07-24 15:37                             ` Eli Zaretskii
2022-07-24 15:42                               ` Eli Zaretskii
2022-07-24 15:32                           ` Stefan Monnier
2022-07-24 15:49                             ` T.V Raman
2022-07-24 16:11                               ` Stefan Monnier
2022-07-24 18:21                                 ` T.V Raman
2022-07-24 18:50                                   ` Stefan Monnier
2022-07-24 16:19                               ` Eli Zaretskii
2022-07-19 16:27     ` Stefan Monnier
2022-07-20 18:36       ` Andrea Corallo
2022-07-21  7:20         ` Eli Zaretskii

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=xjfr11yka1l.fsf@ma.sdf.org \
    --to=akrl@sdf.org \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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).