all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andrea Corallo <akrl@sdf.org>
Cc: Eli Zaretskii <eliz@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>,
	"Andrea Corallo via Emacs development discussions."
	<emacs-devel@gnu.org>
Subject: Re: Native compilation: the bird-eye view
Date: Sun, 23 Aug 2020 14:20:06 -0400	[thread overview]
Message-ID: <jwv364ds0fu.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <xjftuwt493h.fsf@sdf.org> (Andrea Corallo's message of "Sun, 23 Aug 2020 16:31:46 +0000")

>> I don't have a clear understanding of the problem this is trying to solve.
>> Could you summarize it?
>
> Sure,
>
> we need a rule to go from the source file to the eln filename.
>
> /xxx/foo.el -> foo-something1.eln
> /yyy/foo.el -> foo-something2.eln
>
> Given we store all eln "flatted" in a single directory indeed we need to
> have "something1" different from "something2".
[...]
> I then came-up with the current idea of using the source content as
> input of the hash, this should be robust.

Yes, the use of the content-hash should solve this problem "once and
forall".  Maybe the performance cost will force us to reevaluate this
decision, but for now I'm happy with it, so consider it a "solved problem".

> At the moment we are using 2 separate hashes to make the cleaning (easy)
> possible, this is a separate problem that's correct.  The idea is that
> with the two hashes when recompiling is easy to just remove the old file
> as you can identify using the first hash the old one.

I must be missing something: in which way does the filename-hash help here?
Oh, you mean we could look for <same-name-hash>-*.eln and remove them?

What I was thinking of doing was: when we generate a new .elc file, just
before saving the file over the old .elc file, we compute the hash of the
old .elc file and erase any matching .eln file.

> Additionally to that, at any point in time, if you have two file
> sharing the first hash you know that all but the most recent can
> be removed.

Then we could move the content-hash from the .eln filename to within the
.eln file itself.

Note that for the "system-wide" .eln files it can be trickier because we
may want to generate them once and then use them with Emacs installed at
difference locations, so we'd then want to try and avoid using the
absolute file name (and instead use file names that are relative to the
root of the Emacs install or something).

> I think this may be problematic as we could have two different Emacsen
> with two different load-path that are sharing the eln-cache folders.
> This may be a bit of patological case tho.

No, it's definitely not pathological.  It's pretty common for packages to
modify the `load-path` upon first use, so your `load-path` can change
long after startup.

Not to mention situations where you have several different configs
(e.g. I always have 2 Emacs sessions, one dedicated to Gnus and
a "general" one and they share *some* of the config but not all, so
they don't have the same `load-path`).


        Stefan




  reply	other threads:[~2020-08-23 18:20 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-16 11:51 Native compilation: the bird-eye view Eli Zaretskii
2020-05-16 12:58 ` Andrea Corallo
2020-05-16 15:57   ` Paul Eggert
2020-05-16 16:26   ` Eli Zaretskii
2020-05-16 17:03     ` Andrea Corallo
2020-05-16 17:35       ` Eli Zaretskii
2020-05-16 17:44         ` Andrea Corallo
2020-05-16 17:50           ` Eli Zaretskii
2020-05-16 18:26             ` Andrea Corallo
2020-05-16 18:32               ` Eli Zaretskii
2020-05-16 18:41                 ` Andrea Corallo
2020-05-18 14:27                   ` Andrea Corallo
2020-05-19  5:08                     ` ASSI
2020-05-19 16:25                     ` Andrea Corallo
2020-05-19 16:37                       ` Stefan Kangas
2020-05-19 19:16                         ` Andrea Corallo
2020-05-29 17:25                       ` Andrea Corallo
2020-06-02 15:16                       ` Stefan Monnier
2020-06-03 14:23                         ` Andrea Corallo
2020-06-03 14:38                           ` Stefan Monnier
2020-08-10  9:23                             ` Andrea Corallo via Emacs development discussions.
2020-08-10 12:20                               ` Stefan Monnier
2020-08-10 21:34                                 ` Andrea Corallo via Emacs development discussions.
2020-08-15 10:51                                   ` Andrea Corallo via Emacs development discussions.
2020-08-15 15:00                                     ` Eli Zaretskii
2020-08-19 15:01                                     ` Andrea Corallo via Emacs development discussions.
2020-08-20  0:53                                       ` tumashu
2020-08-20  8:11                                         ` Andrea Corallo via Emacs development discussions.
2020-08-23 12:19                                       ` Andrea Corallo via Emacs development discussions.
2020-08-23 15:37                                         ` Stefan Monnier
2020-08-23 16:31                                           ` Andrea Corallo via Emacs development discussions.
2020-08-23 18:20                                             ` Stefan Monnier [this message]
2020-08-24  8:03                                               ` Andrea Corallo via Emacs development discussions.
2020-08-24 13:31                                                 ` Stefan Monnier
2020-08-24 14:09                                                   ` Andrea Corallo via Emacs development discussions.
2020-08-30 10:18                                             ` Path for system-wide .eln files (was: Native compilation: the bird-eye view) Ulrich Mueller
2020-08-30 20:50                                               ` Path for system-wide .eln files Andrea Corallo via Emacs development discussions.
2020-08-30 21:51                                                 ` Stefan Monnier
2020-08-31 19:13                                                   ` Andrea Corallo via Emacs development discussions.
2020-08-31 21:16                                                     ` Ulrich Mueller
2020-09-01  4:28                                                       ` Yuri Khan
2020-09-01  7:16                                                         ` Ulrich Mueller
2020-09-01  8:46                                                           ` tomas
2020-09-04 17:55                                                           ` Andrea Corallo via Emacs development discussions.
2020-09-04 18:25                                                             ` Ulrich Mueller
2020-09-04 19:47                                                               ` Andrea Corallo via Emacs development discussions.
2020-09-04 20:01                                                                 ` Ulrich Mueller
2020-09-04 21:42                                                                   ` Stefan Monnier
2020-09-04 22:59                                                                     ` Ulrich Mueller
2020-09-05  2:58                                                                       ` Stefan Monnier
2020-09-05  7:10                                                                         ` Ulrich Mueller
2020-09-06  6:24                                                                           ` Andrea Corallo via Emacs development discussions.
2020-09-05  7:48                                                                     ` Alfred M. Szmidt
2020-05-16 19:11               ` Native compilation: the bird-eye view Yuan Fu
2020-05-17  4:04                 ` Ihor Radchenko
2020-05-17 11:18                 ` Arthur Miller
2020-05-16 22:09               ` John Wiegley
2020-05-17  4:11     ` Ihor Radchenko
2020-05-17  7:43       ` Andrea Corallo

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

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

  git send-email \
    --in-reply-to=jwv364ds0fu.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=akrl@sdf.org \
    --cc=eggert@cs.ucla.edu \
    --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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.