GNU bug report logs - #56297
Guix style imperfections

Previous Next

Package: guix;

Reported by: Maxime Devos <maximedevos <at> telenet.be>

Date: Wed, 29 Jun 2022 09:34:02 UTC

Severity: normal

Full log


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

From: Maxime Devos <maximedevos <at> telenet.be>
To: bug-guix <at> gnu.org
Subject: Guix style imperfections
Date: Wed, 29 Jun 2022 11:33:05 +0200
[Message part 1 (text/plain, inline)]
Hi,

"guix style" occasionally makes some decision that seem a bit
questionable to me.  More concretely, copy the definition of guile-
next, put it in a .scm and rename it, and run
"guix style -L . guile-next-styleme".  I get:

> (define-module (test))
> (use-modules (guix packages) (guix git-download) (gnu packages autotools) (gnu packages guile) (guix utils)
> (define-public guile-next
>  (let ((version "3.0.7") (revision "0")
>        (commit "d70c1dbebf9ac0fd45af4578c23983ec4a7da535"))

Conventionally 'revision' is put on another line -- for these kind of let bindings,
(maybe all?), I would recommend to put all of them on separate lines.

>    (package
>      (inherit guile-3.0)
>      (name "guile-next-styleme")
>      (version (git-version version revision commit))
>      (source [snip, LGTM])
>      (arguments
>       (substitute-keyword-arguments (package-arguments guile-3.0)
>         ((#:phases phases
>           '%standard-phases) `(modify-phases ,phases

Put %standard-phases on the same line ad #:phases phases and `(modify-phases ,phases
on a new lineg 
>                                 (add-before 'check 'skip-failing-tests
>                                   (lambda _
>                                     (substitute* "test-suite/standalone/test-out-of-memory"
>                                       (("!#") "!#
>
>(exit 77)
>"))

I'd prefer the original "!#\n\n(exit 77)\n" here, but I don't know if that's
something 'Guix style' could feasibly do (there might be situations where a
newline might be appropriate, how could "guix style" which is the case?).

>                                     (delete-file
>                                      "test-suite/tests/version.test") #t))))))

(Would be nice if "guix style" could be taught to remove those #t, but that seems
more a feature limitation than a bug to me.)

>      (native-inputs (modify-inputs (package-native-inputs guile-3.0)
>                       (prepend autoconf
>                                automake
>                                libtool
>                                flex
>                                gnu-gettext
>                                texinfo
>                                gperf)))

I'd consider it tidier to put (modify-inputs ...) on a new line

>     (synopsis "Development version of GNU Guile"))))

Question: do people agree with these style choices?

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 331 days ago.

Previous Next


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