GNU bug report logs - #42289
recursive import does not dort alphabetically

Previous Next

Package: guix;

Reported by: Hartmut Goebel <h.goebel <at> crazy-compilers.com>

Date: Thu, 9 Jul 2020 07:54:02 UTC

Severity: normal

Full log


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

From: zimoun <zimon.toutoune <at> gmail.com>
To: Hartmut Goebel <h.goebel <at> crazy-compilers.com>,
 Leo Famulari <leo <at> famulari.name>
Cc: 42289 <at> debbugs.gnu.org
Subject: Re: bug#42289: recursive import does not dort alphabetically
Date: Thu, 16 Jul 2020 13:35:23 +0200
Dear Hartmut,

On Wed, 15 Jul 2020 at 21:10, Hartmut Goebel <h.goebel <at> crazy-compilers.com> wrote

> Many modules are sorted and some packages even contain a comment asking
> for being sorted. So I had the impression this is good practice.

I am not sure by the "many". :-)
Even gnu/packages/crate-io.scm which explicitly asks:

;;; Please: Try to add new module packages in alphabetic order.

and it is not really sorted. :-)

  cat crates-io.scm | grep 'define-public' | sort --check
  sort: -:6: disorder: (define-public rust-afl-0.5


> Also scanning through the file is easier for humans if packages are
> sorted - depends on personal work style.

It appears to me as a "good practise" too.  On the other hand,
personally I always scan the packages with "ag" (inside Emacs).


However, it is not the point since your initial request is about
alphabetical sort of "guix import"; which seems better than arbitrary
order (dependency order).  Whatever if gnu/packages/foo.scm is sorted or
not.

If "guix import" returns an alphanumerical sorted list, it is easier and
it does not bother the unsorted modules since the packages are new.

All the best,
simon




This bug report was last modified 3 years and 99 days ago.

Previous Next


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