all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Liam Hupfer via Guix-patches via <guix-patches@gnu.org>
To: Liliana Marie Prikler <liliana.prikler@gmail.com>, 72406@debbugs.gnu.org
Cc: cox.katherine.e+guix@gmail.com, gemmaro.dev@gmail.com, andrew@trop.in
Subject: [bug#72406] [PATCH emacs-team WIP v3 24/24] gnu: Build all the other emacs-* variants.
Date: Sun, 11 Aug 2024 11:20:34 -0500	[thread overview]
Message-ID: <871q2vvxnx.fsf@hpfr.net> (raw)
In-Reply-To: <ecbfcde3c2a30fffd4414279dba16ea9ab48c8bf.camel@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4965 bytes --]

Liliana Marie Prikler <liliana.prikler@gmail.com> writes:

> Am Samstag, dem 10.08.2024 um 20:53 -0500 schrieb Liam Hupfer:
>> I assume you used some degree of automation to generate these, but it
>> seems like a bit of a pain to maintain, no? 
> I’m not sure.  We have a similar setup for Common Lisp, where we build
> three variants of everything.

That’s unfortunate 😅.

> The emacs-xyz.scm file is already too large though, and should
> possibly be split up.

I definitely agree with that.

>> I guess you could implement some sort of CI checking if patches for
>> new packages include the correct variants, but it still seems like
>> it will lead to an increase in review burden. Seems too easy to make
>> typos with the variant prefix, for example. 
> I don’t think that, tbh.  I’ve provided a tempel snippet to generate
> those variants, maybe someone can add a yasnippet too.

Editor-specific conveniences are nice, but it doesn’t change how manual
the approach is. I doubt one-time contributors tend to set up the
snippets. We have the full power of Scheme at our disposal, so it seems
like we can do better than N×M Emacs packages, where N is the number of
Emacs variants and M is the number of Emacs Lisp package sources.

>> It seems like there must be a way to indicate to Cuirass to build a
>> set of packages with rewritten inputs, /without/ exposing those
>> packages directly. I believe Nix does something like this by
>> providing an ‘emacsPackagesFor’ function that provides an ergonomic
>> way for users to target an Emacs variant. See Example
>> 6 in [Adding Packages to Emacs — NixOS Manual]. Right now, Guix users
>> have to use something like ‘package-input-rewriting’ directly and
>> figure out the list of Emacs variants to override to their Emacs
>> package, since not all packages use `emacs-minimal’. For binary
>> substitutes, the community emacs-overlay project [tells Hydra to
>> build] the set of Emacs packages with each common Emacs variant.
> I think we can instruct Cuirass to ingest any manifest, but writing and
> maintaining that manifest would be pain.  Plus, the other benefit is
> that as a user, I can type emacs-*-the-package – for some values of *
> at least – and have the correctly built package in my manifest.  No
> more fiddling with package-input-rewriting or transformations.

Maintaining such a manifest, with a single list of Emacs variants and a
single list of Emacs packages to map over, seems far more manageable to
me than to define top-level packages for multiple Emacs variants, where
the variants provided for each package are hardcoded and only kept
consistent by judicious patch review.

Plus, with your more convenient rewriting functions, I think we can
better document this in the manual. Currently the note in `(guix)
Application Setup' only mentions `--with-input', but we should include a
snippet of how to do this declaratively as well.

> But you are right in that we don’t need to introduce more top-level
> packages to at least get some of the benefits.  This series does away
> with emacs-minimal as the default emacs to build stuff with and
> produces a more convenient input rewriting function.  The problem is,
> that it is only available to Scheme code, so people using the CLI would
> miss out on those packages if not declared publicly.

Can’t people using the CLI use `--with-input'? Not very ergonomic, but
regardless, people using the CLI are still limited to whatever
semi-arbitrary set of variants we enumerate, e.g. `emacs-pgtk-xwidgets'
and any non-default `emacs-next' variant are not currently supported.

>> We currently don’t have a well-defined “package set” for Emacs
>> packages to map rewrites over like Nix, and I don’t know if that is
>> ultimately the right solution, but I really don’t think we should
>> approach this by adding so many trivial packages to the top-level
>> package set. Imagine if we took this approach Guix-wide for
>> supporting another libc, for example.
> Again, see Common Lisp where we do exactly that.  And yes, it would be
> nice to have an easier way of enumerating such package variants, but
> I’m not going to hold my breath until we do.

I feel like Common Lisp already doing it is not sufficient justification
to proliferate the approach. I don’t think it scales well for any
package ecosystem. Between finding a way to tell Cuirass to build
substitutes for more Emacs variants and improving documentation on
installing natively compiled packages for a particular variant, I think
we can sufficiently improve the status quo without the package
explosion. But I’m not experienced enough yet to implement what I’m
describing, so I can’t really back up my claims with code, only links to
the Nix approach.

Thanks for responding to my feedback. Good luck with whatever you
decide!

—Liam

      reply	other threads:[~2024-08-11 16:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <13d156332d5c04a9ab411ee24dca58f001b6eace.1723300543.git.liliana.prikler@gmail.com>
2024-08-10  4:31 ` [bug#72406] [PATCH emacs-team WIP v3 18/24] [WIP] gnu: emacs-dvc: Build variants Liliana Marie Prikler
2024-08-10  5:02 ` [bug#72406] [PATCH emacs-team WIP v3 19/24] gnu: emacspeak: " Liliana Marie Prikler
2024-08-10  5:52 ` [bug#72406] [PATCH emacs-team WIP v3 20/24] gnu: emacs-xelb: " Liliana Marie Prikler
2024-08-10  5:54 ` [bug#72406] [PATCH emacs-team WIP v3 21/24] gnu: emacs-exwm: " Liliana Marie Prikler
2024-08-10  9:43 ` [bug#72406] [PATCH emacs-team WIP v3 22/24] gnu: emacs-exwm-x: " Liliana Marie Prikler
2024-08-10  9:43 ` [bug#72406] [PATCH emacs-team WIP v3 23/24] gnu: eless: " Liliana Marie Prikler
2024-08-10 14:15 ` [bug#72406] [PATCH emacs-team WIP v3 24/24] gnu: Build all the other emacs-* variants Liliana Marie Prikler
2024-08-11  1:53   ` Liam Hupfer via Guix-patches via
2024-08-11  6:30     ` Liliana Marie Prikler
2024-08-11 16:20       ` Liam Hupfer via Guix-patches via [this message]

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=871q2vvxnx.fsf@hpfr.net \
    --to=guix-patches@gnu.org \
    --cc=72406@debbugs.gnu.org \
    --cc=andrew@trop.in \
    --cc=cox.katherine.e+guix@gmail.com \
    --cc=gemmaro.dev@gmail.com \
    --cc=liam@hpfr.net \
    --cc=liliana.prikler@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 external index

	https://git.savannah.gnu.org/cgit/guix.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.