unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Liliana Marie Prikler <liliana.prikler@gmail.com>
To: Mekeor Melire <mekeor@posteo.de>, 63920@debbugs.gnu.org
Subject: bug#63920: Emacs Packages should have an output built with emacs-next(-minimal)
Date: Tue, 06 Jun 2023 18:07:42 +0200	[thread overview]
Message-ID: <86d39d60b16eeeaed7d149773864f322ab109a78.camel@gmail.com> (raw)
In-Reply-To: <87pm696o2j.fsf@posteo.de>

Hi Mekeor,

Am Dienstag, dem 06.06.2023 um 07:11 +0000 schrieb Mekeor Melire:
> Hello dear Guix community,
> 
> if I understand correctly, all Emacs-packages that are packaged in 
> Guix proper, are built with Emacs version 28 (or more precisely, 
> emacs-minimal@28, emacs@28, emacs-no-x@28, emacs-no-x-toolkit@28 
> or emacs-wide-int@28 (except emacs-jsdoc which is and needs to be 
> built with emacs-next@29)). (You may grep the Guix repository for 
> ":emacs" to find out by yourself.)
Emacs packages other than emacs-minimal should be the exception rather
than the norm.  

> When using these Emacs-packages with emacs-next* (i.e. version 29 
> or 30), this can lead to misbehavior because Emacs will still 
> prefer the compiled .elc or .eln files which may depend on version 
> 28 specifics.
It should not prefer the .eln files, which get put into a unique
directory per Emacs – yes, that ought to include different versions of
the emacs package itself built with inputs that had their hashes
changed.  In any case, the version number itself (28 vs 29) is enough
to turn .eln loading away.

For .elc, the behaviour is indeed as you described, but that's rather
due to the fact that bytecode ought to be forward-compatible.  The
packages you describe below thus invoke (IIUC) undefined behaviour.

> My concrete experience is that, when using emacs-next-tree-sitter 
> and emacs-consult packages, evaluating (require 'consult-register) 
> fails because it has emacs-major-version-specific code: 
> https://github.com/minad/consult/blob/3c0f87ebd20b25f03568fb9ef8fd36b5a2a6eb84/consult-register.el#L82
>  
> (A workaround is to instead evaluate (load 
> "consult-register.el").)
> 
> I propose:
> 
> 1. Introduce a package emacs-next-minimal.
> 
> 2. For all Emacs-packages, create one output corresponding to each 
> Emacs major-version packaged in Guix proper. For example, the 
> output "emacs-next" would be built with emacs-next-minimal.
> 
> What do you think? I'd guess this should be hard to implement, 
> right?
This would unnecessarily complicate things over at emacs-build-system.
Now, emacs-next-minimal itself might be worthwhile (I don't see a
strong reason as to why, though), but since native compilation was
introduced to Guix, the recommendation was to compile packages ahead of
time rather than using the built-in JIT.  To do so, add 
  --with-input=emacs-minimal=emacs-next
or use a semantically equivalent options->transformation.  

As for a long-term solution to the problem, I do think we could make
the situation easier by providing dedicated alternatives (e.g. "emacs-
next-consult") or using parameterized packages (which is a larger TODO
than emacs-build-system, however).  As a member of the emacs-team, I do
have to sadly report that we have yet to start the most serious work
for making emacs-next the new emacs.

Cheers




  reply	other threads:[~2023-06-06 16:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-06  7:11 bug#63920: Emacs Packages should have an output built with emacs-next(-minimal) Mekeor Melire
2023-06-06 16:07 ` Liliana Marie Prikler [this message]
2023-10-04  2:20   ` Maxim Cournoyer
2023-10-04  9:14     ` bug#63920: Allow for easily rewriting Emacs packages to use emacs-next Simon Tournier

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://guix.gnu.org/

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

  git send-email \
    --in-reply-to=86d39d60b16eeeaed7d149773864f322ab109a78.camel@gmail.com \
    --to=liliana.prikler@gmail.com \
    --cc=63920@debbugs.gnu.org \
    --cc=mekeor@posteo.de \
    /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/guix.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).