all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Tobias Geerinckx-Rice <me@tobias.gr>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Recommend order for package fields?
Date: Mon, 15 Nov 2021 17:45:12 +0100	[thread overview]
Message-ID: <86tugd9xlz.fsf@gmail.com> (raw)
In-Reply-To: <87r1bsqdy8.fsf@nckx>

Hi,

On Sun, 07 Nov 2021 at 13:40, Tobias Geerinckx-Rice via Guix-patches via <guix-patches@gnu.org> wrote:

> So the de-facto ordering of common fields is something like:
>
> name
> version
> source
> build-system
> outputs ; a bit inconsistent, yes, and sometimes put after *inputs
> arguments ; to the build-system
> native-inputs, inputs, propagated-inputs
> metadata: synopsis, description, home-page, properties, license…
>
> There's some minor variation in where to put inputs, but 
> (build-system trivial-build-system) definitely belongs here, above 
> arguments, no matter what.

Does it make sense to add this ordering advice in the manual?  Somewhere
under section “Contributing”.

Especially when there is probably some issues with the semantic, for
instance, compare [1] corner cases:

--8<---------------cut here---------------start------------->8---
$ guix repl
GNU Guile 3.0.7
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> (let ((name "OUTER"))
  (package-version
   (package
     (version name)
     (name "name")
     (source #f)
     (build-system #f)
     (synopsis #f)
     (description #f)
     (license #f)
     (home-page #f))))

$1 = "OUTER"
scheme@(guix-user)> (let ((name "OUTER"))
  (package-version
   (package
     (name "INNER")
     (version name)
     (source #f)
     (build-system #f)
     (synopsis #f)
     (description #f)
     (license #f)
     (home-page #f))))
$2 = "INNER"
--8<---------------cut here---------------end--------------->8---

where a record field refers to another defined record field.


If yes, why not add a checker for “guix lint” for warning that?  And
obviously, it could be nice to have an automatic tool for formatting;
something similar as etc/indent-code.el for ordering packages. ;-)

Cheers,
simon


1: <https://yhetil.org/guix/20201204161257.64363a5a@scratchpost.org/>


  parent reply	other threads:[~2021-11-15 16:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-30 14:59 [bug#51512] [PATCH]: gnu: Add bash-bcu david larsson
2021-11-07 12:40 ` Tobias Geerinckx-Rice via Guix-patches via
2021-11-09 12:32   ` [bug#51512] [PATCH v 2]: " david larsson
2021-11-20 14:11     ` Tobias Geerinckx-Rice via Guix-patches via
2021-11-23 12:44       ` david larsson
2022-07-01 18:13     ` [bug#51512] [PATCH v 3]: " david larsson
2022-08-02 20:21       ` david larsson
2022-08-27 18:29         ` david larsson
2023-05-20 19:23           ` david larsson
2023-05-20 19:28             ` david larsson
2023-05-20 20:16           ` [bug#51512] [PATCH v 4]: " david larsson
2021-11-15 16:45   ` zimoun [this message]
2021-11-16 18:54     ` Recommend order for package fields? Katherine Cox-Buday
2021-11-17 11:15       ` Ludovic Courtès
2021-11-17 11:18     ` Ludovic Courtès
2021-11-17 11:40       ` zimoun
2021-11-19 14:51         ` Ludovic Courtès
2022-07-04 21:11 ` [bug#51512] [PATCH]: gnu: Add bash-bcu ( via Guix-patches via
2022-07-04 21:21   ` ( via Guix-patches via
2023-05-21  6:58 ` [bug#51512] [PATCH v5]: " david larsson
2023-05-23  4:51 ` [bug#51512] [PATCH v6 0/3]: " david larsson
2023-05-23  4:53 ` [bug#51512] [PATCH v6 1/3]: " david larsson
2023-05-23  4:55 ` [bug#51512] [PATCH v6 2/3]: gnu: Add guile-bash-for-bash-coding-utils david larsson
2023-05-23  4:56 ` [bug#51512] [PATCH v6 3/3]: gnu: Add bash-coding-utils david larsson

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=86tugd9xlz.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=me@tobias.gr \
    /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.