From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yKmPEosmvGLbAwEAbAwnHQ (envelope-from ) for ; Wed, 29 Jun 2022 12:16:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uHaXEYsmvGJk9QAAG6o9tA (envelope-from ) for ; Wed, 29 Jun 2022 12:16:43 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E5E333A7CD for ; Wed, 29 Jun 2022 12:16:42 +0200 (CEST) Received: from localhost ([::1]:52646 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6UkT-0000vm-Uh for larch@yhetil.org; Wed, 29 Jun 2022 06:16:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6Ujr-0000W9-KB for bug-guix@gnu.org; Wed, 29 Jun 2022 06:16:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35428) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6Ujq-0002vA-DP for bug-guix@gnu.org; Wed, 29 Jun 2022 06:16:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6Ujq-0007NT-A3 for bug-guix@gnu.org; Wed, 29 Jun 2022 06:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56297: Guix style imperfections Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 29 Jun 2022 10:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56297 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos , 56297@debbugs.gnu.org Received: via spool by 56297-submit@debbugs.gnu.org id=B56297.165649770928239 (code B ref 56297); Wed, 29 Jun 2022 10:16:02 +0000 Received: (at 56297) by debbugs.gnu.org; 29 Jun 2022 10:15:09 +0000 Received: from localhost ([127.0.0.1]:57544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6Uiy-0007LP-Ie for submit@debbugs.gnu.org; Wed, 29 Jun 2022 06:15:08 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:41839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6Uiw-0007LG-Hy for 56297@debbugs.gnu.org; Wed, 29 Jun 2022 06:15:07 -0400 Received: from lprikler-laptop.ist.intra (gw.ist.tugraz.at [129.27.202.101]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4LXy526NM0z1LLyW; Wed, 29 Jun 2022 12:15:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mailrelay.tugraz.at 4LXy526NM0z1LLyW DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1656497703; bh=8kGbGjDEYPAsqPbRXMLDTxhWnFXg5pmrodsxqx8+WN4=; h=Subject:From:To:Date:In-Reply-To:References:From; b=Pq5oSHEfWXwiVBYNIJjb3PrwOuvbzLwZClkaw1ftF+Lv8/ZAQQpZULymPFfkmOYKX uEvKn6b0RR7PpBnXQQ4jvdui4G7lEjpL4QgVIcjQoubiIrBFZ8KMYw5TttpjaUY9cc Cemh7RH5cR3pTvBMgUYeoMLGaJ2tMvYhn7NTXV3Y= Message-ID: <1d570330e9811ec9327ec4f99e2baed4fd922194.camel@ist.tugraz.at> From: Liliana Marie Prikler Date: Wed, 29 Jun 2022 12:15:02 +0200 In-Reply-To: <9499300db3fe4222f7126240fb2acad3cdf4371b.camel@telenet.be> References: <9499300db3fe4222f7126240fb2acad3cdf4371b.camel@telenet.be> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: waObeELIUl4ypBWmcn/8wQ X-Scanned-By: MIMEDefang 2.74 on 129.27.10.116 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1656497803; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=8kGbGjDEYPAsqPbRXMLDTxhWnFXg5pmrodsxqx8+WN4=; b=OFysOd28tIyxFpxFUT+sLFLca5Joo7k50hJRn+Y/6FOIn7Ol3rz+19fUp99oaCuwmc2HHF D3LqcTaNiJzFvc4gRd9NjrrTAVitYMFSZ8wMcrUUOsbJ4DDkGMYG0hd9ERpv84P+buYJQ1 7Cnx68P0eXib4u1IGbS78GNMJWcTMGq3xBVKFLO8eaVRBq9tmCVGmWT5dKOIz5h7rIYo1t Y6XgmexcfmCyewaVj9xl4uudzchdfT6tupN8A7AxRXU3394DdAhfgT8GTFdYGl/z+ifXTr Jqpd5VWlZufsLGczwGYa5FUfzuxuAII9KZj0S1JxzFsH1al+RovWd+FzSeH3MQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656497803; a=rsa-sha256; cv=none; b=HErvit5yggq5YX3DlU4TTPUGegzM6XFwGrFPBq3lpJpnlAwpvzCEInxh9gpr1ra9V34ZwH xTFbWcSQKd9gsl5IM/zx6DFPXexSXdvOwwAGXfk6crBTb1Qxgp7AC2VqYJ2ld+nIa7Xn7x uPp8r4eTH2miu+vmdQEcaFBGJc2dlluwYcJszYMJ89hvA0wLwrUMR3XEGZR5uaPKdoU9dW zm2WiEXfdterkSrcCJfrcLcy8HQAeddjtG99GOj8u3f1f1GKS9o5SVeUdl32gt6wbnZZ8u ey0nNZ1/aoZjZzbPKorF1qf7tgkMSJhOpiotLJB9yy2fpO1FCNopdeHHHs+DjQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Pq5oSHEf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.44 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=tugraz.at header.s=mailrelay header.b=Pq5oSHEf; dmarc=fail reason="SPF not aligned (relaxed)" header.from=tugraz.at (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E5E333A7CD X-Spam-Score: 6.44 X-Migadu-Scanner: scn0.migadu.com X-TUID: /PYDnUFy5/uO Am Mittwoch, dem 29.06.2022 um 11:33 +0200 schrieb Maxime Devos: > 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: Before commenting on the individual points, I do think in general guix style needs to have a "lax" mode and a "strict" mode where the latter is enabled via "--strict" and keeps certain snippets as-is. All elements that save vertical space at the cost of horizontal space should be disabled in strict mode, whereas they might be acceptable in lax mode. > > (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. Agree. > >    (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 line Agree. What's even the point the current style tries to make? > >                                 (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?). I'd prefer if strict mode typed those out, but we can keep strings "as- is" in lax mode, supposing they don't grow beyond the horizontal limit. > >                                     (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.) It can still do better by not contracting them imho. > >      (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 Here, it depends. I think I'd write this as (native-inputs  (modify-inputs (package-native-inputs guile-3.0) (prepend autoconf automake libtool flex gperf gnu-gettext texinfo))) > >     (synopsis "Development version of GNU Guile")))) > > Question: do people agree with these style choices? I think some people might actually be okay with a few or even all of them (juding by how many submit collapsed lets), but I'd like to point out that they break with Lisp coding guidelines for no good reason. Regarding the optimization of vertical space, I do think that guix lacks semantic information to make meaningful choices and thus ought to either step back when an "informed" user invokes the tool or strictly take the "least optimal, but correct" approach in strict mode. Cheers