unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: spacecadet <spacecadet@purge.sh>
To: Nicolas Graves <ngraves@ngraves.fr>, guix-devel@gnu.org
Subject: Re: Functional package interface
Date: Tue, 16 Apr 2024 15:31:11 +0000	[thread overview]
Message-ID: <b0321e86-70e5-b4c2-0bd8-3e01193de4e1@purge.sh> (raw)
In-Reply-To: <87le5dogr7.fsf@ngraves.fr>

> In the code there, the function propagate-packages will indeed try and
> propagate every package through the graph node.

I looked at your code, it's comprehensive. I wasn't sure such a thing
was possible with input rewriting, although I think there's still a lot
of benefit to the functional approach, like this:
> - some packages are present under different names (emacs has
> emacs-minimal, emacs, emacs-pgtk, emacs-wide-int...) and that is not
> handled by this function.

It should handle it pretty elegantly, since those packages inherit from
emacs, if you replace emacs they'll inherit from your replacement while
keeping their unique traits.

> - propagating some packages that are used in build-systems will trigger
> massive rebuilds (e.g. go, emacs, python, ocaml, texlive), you'll
> probably have to be smart about what you want to avoid to propagate, but
> it's great because guix can already hide a package to
> package-inputs-rewriting using (hidden-package {package-name}). There are some
> examples in the series.

No idea how, but I guess I should implement a #:mask-hidden? argument
to handle this. I have more basic issues for now, but that's a good
point.

> - this has a cost. I haven't timed it yet, but the slowdown is
>    noticeable, though still quite usable.

I'm doing a couple stupid things, it's improved with the last few
commits, but there's still a long way to go. If there's a cost to
syntax rule abuse, you were probably feeling that.

> - you of course have to get the packages into the function from a
>    profile. Here's it's done in RDE's code, but that should be quite
>    doable in Guix too.

Yeah, the implementation model is kinda strange. Having to put extra
code in every single module in the entire repo isn't a great
prerequisite for anything. It could be the point that prevents this
from manifesting. The mile long butt-ugly list of inputs that it needs
doesn't help.

Thanks for the tips. Work is still ongoing, but recursive propagation
now works when giving one package-set another as an input, so the
intended use-case is now possible.

- sc


      reply	other threads:[~2024-04-16 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14  7:02 Functional package interface spacecadet
2024-04-15 21:31 ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-16  1:17   ` spacecadet
2024-04-16  8:26     ` Nicolas Graves via Development of GNU Guix and the GNU System distribution.
2024-04-16 15:31       ` spacecadet [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

  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=b0321e86-70e5-b4c2-0bd8-3e01193de4e1@purge.sh \
    --to=spacecadet@purge.sh \
    --cc=guix-devel@gnu.org \
    --cc=ngraves@ngraves.fr \
    /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).