From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 29 05:33:24 2022 Received: (at submit) by debbugs.gnu.org; 29 Jun 2022 09:33:24 +0000 Received: from localhost ([127.0.0.1]:57438 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6U4Z-00045W-P5 for submit@debbugs.gnu.org; Wed, 29 Jun 2022 05:33:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:37714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6U4X-00045N-1A for submit@debbugs.gnu.org; Wed, 29 Jun 2022 05:33:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6U4W-0005Sb-QN for bug-guix@gnu.org; Wed, 29 Jun 2022 05:33:20 -0400 Received: from michel.telenet-ops.be ([2a02:1800:110:4::f00:18]:39314) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6U4U-0008W2-Cp for bug-guix@gnu.org; Wed, 29 Jun 2022 05:33:20 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by michel.telenet-ops.be with bizsmtp id oxZB270034UW6Th06xZBX5; Wed, 29 Jun 2022 11:33:11 +0200 Message-ID: <9499300db3fe4222f7126240fb2acad3cdf4371b.camel@telenet.be> Subject: Guix style imperfections From: Maxime Devos To: bug-guix@gnu.org Date: Wed, 29 Jun 2022 11:33:05 +0200 Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-Eo50Gz7S8HCjnRg6uFzR" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1656495191; bh=/VLN/hd/oX7gtRpEAOLqp6lS2VEcBsJhmqdAmRPgrtQ=; h=Subject:From:To:Date; b=duRSLMnwUpkspzwCyWeqnWAHDzhDFNrHxHQLZiz5ZLrGA3IrACUPW5ElyKCVoLVxJ M2K7OgbhQX95vNgxQk9xLR1jVzi2D8WHNgJc85tq5mqmMYBpEi5QNq4DUJ4HxxsU7w vUV1X2kWbaT6RCg4Ow+NM+yDizX2DQ/rVzdXOeK19Jo6vbkOPLyE2aZpgYoEqUD76I 5eJAj/c8DeKEOSJAUP/IOTD/wbZnuXwB6R6b2u5XR7dOwPB7DXdvj6XK+mjXBOL5tp M3CychfkKWnC7YdjXYzOibqbD175WUHyKvYfPXQWp18r/Db4box8Qg9B7lMYdgUmNW yItdjD1nOAV4g== Received-SPF: pass client-ip=2a02:1800:110:4::f00:18; envelope-from=maximedevos@telenet.be; helo=michel.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-Eo50Gz7S8HCjnRg6uFzR Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 b= indings, (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-phase= s ,phases on a new lineg=20 > (add-before 'check 'skip-failing-tests > (lambda _ > (substitute* "test-suite/standalone/t= est-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. --=-Eo50Gz7S8HCjnRg6uFzR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYrwcURccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oJFAP4hReQBKh4e79ZjH4zlWDSf0wxF fIxX69bkVPNSJJIyAQEAlwFXbrhB8Fk0IRrOgnGHf7qfLhintGcnSxfbthuyQgI= =yODs -----END PGP SIGNATURE----- --=-Eo50Gz7S8HCjnRg6uFzR--