unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: akrl--- via "Emacs development discussions." <emacs-devel@gnu.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org, phillip.lord@russet.org.uk
Subject: Re: [feature/native-comp] breakage on build
Date: Mon, 01 Feb 2021 11:01:04 +0000	[thread overview]
Message-ID: <xjfpn1kt5lb.fsf@sdf.org> (raw)
In-Reply-To: <83sg6h6s6d.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 31 Jan 2021 17:29:30 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: phillip.lord@russet.org.uk,  emacs-devel@gnu.org
>> Date: Sat, 30 Jan 2021 20:17:58 +0000
>> 
>> >> native-lisp/28.0.50-x86_64-w64-mingw32-HASH1/titdic-cnv-HASH2-HASH3.eln
>> >> 
>> >> - HASH1 disambiguate triplet, Emacs configuration, version etc.
>> >
>> > But that information is already present in the text before:
>> > 28.0.50-x86_64-w64-mingw32.  What else is missing that we need a hash?
>> 
>> I left the text before as indicative and human readable but
>> unfortunatelly that's not complete.
>> 
>> The list of all primitive functions contribute to the eln linking
>> mechanism we use and is accounted in this hash.  Also we can trigger the
>> generation of a new hash each time we deploy an eln ABI breaking change.
>
> Sorry, I don't follow.  You said HASH1 disambiguates the triplet, and
> that is already present in the name.  Please elaborate on the other
> factors that affect HASH1, as what you said (primitives that
> contribute? eln ABI breaking changes?) isn't enough for me to
> understand what information they record.

Sure,

each .eln while executing must indeed call into Emacs C code.  Call
happens through function pointers, say we must call Fmessage, something
like this will be rendered into the eln:

freloc_link_table->Fmessage (...)

'freloc_link_table' is a pointer statically allocated within the eln
object, it gets set while loading to point to the right data structure
in memory.  This data structure is a C structure holding all function
pointers to all Emacs primitive functions.

For this reason we must be sure that the definition of
'freloc_link_table' use while compiling the eln matches the one offered
by the Emacs loading the eln file.

This is the main reason eln are not portable between different Emacs
configurations.

HASH1 has the duty to disambiguates this and everything else that could
reflect into an incompatibility of the eln (`system-configuration`
`emacs-version`).

As from time to time we can refine mechanisms like the load mechanism or
anything else and consequentially generating another incompatibility the
macro ABI_VERSION also contribute to HASH1.  I bump a new number there
each time I realize I'm changing something that introduce and
incompatibility.

To summarize eln was never designed for compatibility across versions or
configurations and HASH1 is made to guard against that.

> And in any case, if the triplet is in HASH1, why not remove its
> human-readable representation and save a few bytes?

At the time was thought to be convinient to have the triplet also as
human readable.  Indeed no problem from my side on removing it if this
is problematic (wasn't aware of this Windows limitation).

That said I think the main cure for this Windows file length issue is to
diet down the hash length to something more reasonable (16 or 8
characters?).

Regards

  Andrea



  reply	other threads:[~2021-02-01 11:01 UTC|newest]

Thread overview: 99+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 10:37 [feature/native-comp] breakage on build Phillip Lord
2021-01-30 13:26 ` akrl--- via Emacs development discussions.
2021-01-30 14:40   ` phillip.lord
2021-01-30 15:01     ` phillip.lord
2021-01-30 16:21       ` Eli Zaretskii
2021-01-30 16:38         ` Eli Zaretskii
2021-01-30 17:06           ` Eli Zaretskii
2021-01-30 17:19             ` phillip.lord
2021-01-30 19:44             ` akrl--- via Emacs development discussions.
2021-01-30 19:58               ` Eli Zaretskii
2021-01-30 20:17                 ` akrl--- via Emacs development discussions.
2021-01-31 15:29                   ` Eli Zaretskii
2021-02-01 11:01                     ` akrl--- via Emacs development discussions. [this message]
2021-02-01 15:25                       ` Eli Zaretskii
2021-02-01 16:20                         ` akrl--- via Emacs development discussions.
     [not found]                           ` <831rdz7mf5.fsf@gnu.org>
2021-02-01 19:01                             ` akrl--- via Emacs development discussions.
2021-02-01 19:06                             ` Phillip Lord
2021-02-01 19:36                               ` Eli Zaretskii
2021-02-01 19:37                           ` Stefan Monnier
2021-02-01 20:33                             ` akrl--- via Emacs development discussions.
2021-02-02 20:26                         ` akrl--- via Emacs development discussions.
2021-02-02 20:29                           ` Eli Zaretskii
2021-02-03 12:37                             ` akrl--- via Emacs development discussions.
2021-02-03 16:36                             ` Phillip Lord
2021-02-03 20:27                               ` akrl--- via Emacs development discussions.
2021-02-04  3:31                                 ` Eli Zaretskii
2021-02-04 14:39                                 ` Phillip Lord
2021-02-04 15:31                                   ` Eli Zaretskii
2021-02-04 15:52                                     ` Phillip Lord
2021-02-04 16:24                                       ` Eli Zaretskii
2021-02-04 20:24                                         ` Óscar Fuentes
2021-02-04 20:44                                           ` Eli Zaretskii
2021-02-04 22:08                                             ` Óscar Fuentes
2021-02-05 11:50                                               ` Eli Zaretskii
2021-02-05 14:47                                                 ` Óscar Fuentes
2021-02-05 21:29                                                   ` Phillip Lord
2021-02-05 22:56                                                     ` Óscar Fuentes
2021-02-06 13:15                                                       ` Phillip Lord
2021-02-07  2:52                                                         ` Óscar Fuentes
2021-02-07 18:56                                                           ` Phillip Lord
2021-02-07 19:38                                                             ` Óscar Fuentes
2021-02-07 19:49                                                               ` Eli Zaretskii
2021-02-07 20:33                                                                 ` Stefan Monnier
2021-02-07 21:23                                                                   ` Óscar Fuentes
2021-02-07 22:23                                                                   ` Phillip Lord
2021-02-07 22:21                                                               ` Phillip Lord
2021-02-07 23:38                                                                 ` Óscar Fuentes
2021-02-08 12:03                                                                   ` Phillip Lord
2021-02-06  7:32                                                     ` Eli Zaretskii
2021-02-04 16:22                                   ` Andrea Corallo via Emacs development discussions.
2021-02-04 21:07                                     ` Phillip Lord
2021-02-04 23:32                                       ` Andrea Corallo via Emacs development discussions.
2021-02-05 10:05                                         ` Phillip Lord
2021-02-05 11:35                                           ` Eli Zaretskii
2021-02-05 20:37                                             ` Phillip Lord
2021-02-05 21:04                                               ` Eli Zaretskii
2021-02-05 21:50                                                 ` Phillip Lord
2021-02-06  7:45                                                   ` Eli Zaretskii
2021-02-06 12:58                                                     ` Phillip Lord
2021-02-06 13:45                                                       ` Eli Zaretskii
2021-02-07 19:11                                                         ` Phillip Lord
2021-02-08  9:32                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-08 12:08                                                             ` Phillip Lord
2021-02-08 14:28                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 14:47                                                                 ` Phillip Lord
2021-02-08 15:14                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-08 21:38                                                                     ` Stefan Monnier
2021-02-09  8:25                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-09 22:38                                                                         ` Phillip Lord
2021-02-10  8:44                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-10 14:04                                                                             ` Stefan Monnier
2021-02-10 14:23                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-15 19:17                                                                                 ` Phillip Lord
2021-02-10 15:16                                                                             ` Eli Zaretskii
2021-02-10 20:41                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-11 14:11                                                                                 ` Eli Zaretskii
2021-02-11 14:51                                                                                   ` Andrea Corallo via Emacs development discussions.
2021-02-11 15:24                                                                                     ` Eli Zaretskii
2021-02-11 15:53                                                                                       ` Andrea Corallo via Emacs development discussions.
2021-02-11 16:11                                                                                         ` Stefan Monnier
2021-02-11 16:20                                                                                           ` Andrea Corallo via Emacs development discussions.
2021-02-11 20:52                                                                                             ` Andrea Corallo via Emacs development discussions.
2021-02-12  6:46                                                                                               ` Eli Zaretskii
2021-02-10 21:23                                                                             ` Phillip Lord
2021-02-11  8:39                                                                               ` Andrea Corallo via Emacs development discussions.
2021-02-08 15:25                                                                 ` Eli Zaretskii
2021-02-08 15:23                                                               ` Eli Zaretskii
2021-02-07  2:15                                                       ` Óscar Fuentes
2021-02-07  4:14                                                         ` Óscar Fuentes
2021-02-05 11:35                                           ` Andrea Corallo via Emacs development discussions.
2021-02-05 20:44                                             ` Phillip Lord
2021-02-05  7:28                                       ` Eli Zaretskii
2021-01-30 20:21               ` Óscar Fuentes
2021-01-30 22:06                 ` Stefan Monnier
2021-01-30 22:23                   ` Óscar Fuentes
2021-01-30 22:53                     ` Stefan Monnier
2021-02-02  0:27               ` Andy Moreton
2021-02-02  9:11                 ` akrl--- via Emacs development discussions.
  -- strict thread matches above, loose matches on Subject: below --
2021-02-01 18:39 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=xjfpn1kt5lb.fsf@sdf.org \
    --to=emacs-devel@gnu.org \
    --cc=akrl@sdf.org \
    --cc=eliz@gnu.org \
    --cc=phillip.lord@russet.org.uk \
    /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).