GNU bug report logs - #73073
[PATCH 0/6] Allow origin with label as inputs.

Previous Next

Package: guix-patches;

Reported by: Simon Tournier <zimon.toutoune <at> gmail.com>

Date: Fri, 6 Sep 2024 15:52:01 UTC

Severity: normal

Tags: moreinfo, patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #29 received at 73073 <at> debbugs.gnu.org (full text, mbox):

From: Simon Tournier <zimon.toutoune <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 73073 <at> debbugs.gnu.org
Cc: Vivien Kraus <vivien <at> planete-kraus.eu>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: Re: [bug#73073] [PATCH 4/6] gnu: gnome-recipes: Move libgd origin
 from phases to native-inputs.
Date: Fri, 06 Sep 2024 20:11:27 +0200
Hi Liliana,

My aim is not to mix, under ’inputs’ record field, the old style (label)
with the new style (no label) but to have the ’origin’ inside ’inputs’
and not inside ’arguments’.


On Fri, 06 Sep 2024 at 19:33, Liliana Marie Prikler <liliana.prikler <at> gmail.com> wrote:

> I can see why you're doing that, but I'm not really convinced it helps
> the package.

As I wrote in the cover letter:

        This is annoying because these origins are hidden from
        ’package-direct-sources’; see module (guix packages).

So it helps the package. ;-)

Please note that the docstring of ’package-direct-sources’ is currently
lying. ;-)  Well, the situation is a bug, IMHO.

--8<---------------cut here---------------start------------->8---
  "Return all source origins associated with PACKAGE; including origins in
PACKAGE's inputs and patches."
--8<---------------cut here---------------end--------------->8---


> IMHO, G-Expressions in phases serve in part to facilitate uses like
> this.

I agree that G-exps facilitate manipulation of store paths.  But using
’origin’ inside arguments appears to me as an abuse of the feature.  As
I wrote in the cover letter:

        Moreover and tangentially, it appears to me an anti-pattern of the
        functional paradigm: The data from the impure outside should be handled
        by the ’source’ record field, or otherwise by ’inputs’, ’native-inputs’
        or ’propagated-inputs’ record fields; let say only ’inputs’ for
        simplicity.

Therefore, I strongly think ’origin’ should not be inside arguments.

Somehow, my submission is a proposal for dealing with the case.  And
it’s not really if it needs to, or should, be done. :-)


>               Particularly, we're now even adding a labeled input,
> which makes for a cursed situation where all but one inputs are
> unlabeled¹.

Please note it’s a specific inputs: it’s an ’origin’.  This can be
checked by the pattern matching, e.g.,

    (((? string? label) (? origin? o) ;Allow old style as sometimes requires by origin in inputs
     `(,label ,o))

Other said, it would not be a “cursed situation”; only a situation using
a locally defined input.


Cheers,
simon




This bug report was last modified 237 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.