all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Clément Lassieur" <clement@lassieur.org>
To: John Kehayias <john.kehayias@protonmail.com>
Cc: Christopher Baines <mail@cbaines.net>,  guix-devel@gnu.org
Subject: Re: branch master updated: gnu: Add passff.
Date: Tue, 31 Oct 2023 20:33:35 +0100	[thread overview]
Message-ID: <8734xq8u40.fsf@lassieur.org> (raw)
In-Reply-To: <87a5rzv76k.fsf@protonmail.com> (John Kehayias's message of "Tue,  31 Oct 2023 02:48:09 +0000")

Hi John,

Thanks for taking the time to write this message.

On Tue, Oct 31 2023, John Kehayias wrote:

> Right, it uses gexps but I think here the better and more explicit
> style would be to use inputs/native-inputs. Then instead of
> referencing directly like #$<package-variable-name> use
> #$(this-package-input "package-name") to get the store path. This I
> think is clearer and I believe better allows for inheritance,
> input-rewriting, and so on.

You are right, I'll amend my patch, taking this into account.

I believe `guix lint` should say something about it though, maybe warn
when using an input that is not explicitly added in the `input` field.
Those errors are hard to catch and are in our code base at several
places already.

I've also noticed there is some subtle in-between style in our code
base: people adding x as input but still using #$x in the package
definition instead of using #$(this-package-input "x").  It's wrong
because in this case input rewriting does not work.

G-Expressions allow for weird things.  Here's another weird pattern from
our code base: going from (inputs `("foo", ,(origin ...))) to #$(origin
...)  without inputs.  This removes input rewriting too.

> Feel free for anyone else to chime in on this point, I'm always
> looking to learn to improve my own packaging and review, but this is
> what I understand is preferred when possible.
>
>>> Was this change sent as a patch to guix-patches?
>>
>> No it wasn't.
>
> The mantra I've heard, and agree with, is that the
> trivial-build-system is anything but trivial. Not saying it wasn't the
> best choice here, or has anything to do with the above points, but
> thought it worth mentioning for anyone else.

Agreed.

> But this is also why I think it would have been better to have it go
> through review. I see there's been several followup commits to improve
> the style and fix things which also could have been avoided. Not a
> huge deal perhaps, but I would err on the side of review for something
> like this.

I thought my patch was trivial, but I was obviously wrong since I
(indeed) amended it twice, and now a third time.

> Of course, thanks for the contribution!

Thanks for the kind words :)

Clément


  reply	other threads:[~2023-10-31 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <169826674567.18633.11885829962706141651@vcs2.savannah.gnu.org>
2023-10-28 14:35 ` branch master updated: gnu: Add passff Christopher Baines
2023-10-28 15:05   ` Clément Lassieur
2023-10-28 17:53     ` Kaelyn
2023-10-30 14:23       ` Clément Lassieur
2023-11-01  3:33         ` Clément Lassieur
2023-10-31  2:48     ` John Kehayias
2023-10-31 19:33       ` Clément Lassieur [this message]
2023-11-01  3:36         ` Clément Lassieur
2023-11-03 18:46     ` G-expressions and chroot environment? (was Re: branch master updated: gnu: Add passff.) Simon Tournier
2023-11-06 15:19       ` 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

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

  git send-email \
    --in-reply-to=8734xq8u40.fsf@lassieur.org \
    --to=clement@lassieur.org \
    --cc=guix-devel@gnu.org \
    --cc=john.kehayias@protonmail.com \
    --cc=mail@cbaines.net \
    /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.