From patchwork Fri May 5 21:40:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 49823 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 21DFB27BBEA; Fri, 5 May 2023 22:41:44 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 127CD27BBE2 for ; Fri, 5 May 2023 22:41:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pv3As-0005yI-Bt; Fri, 05 May 2023 17:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv3Al-0005xZ-GC for guix-patches@gnu.org; Fri, 05 May 2023 17:41:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pv3Al-0001Kd-6n for guix-patches@gnu.org; Fri, 05 May 2023 17:41:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pv3Ak-0000XI-Go; Fri, 05 May 2023 17:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63320] [PATCH 1/2] style: Add 'arguments' styling rule. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: me@tobias.gr, guix-patches@gnu.org Resent-Date: Fri, 05 May 2023 21:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63320 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63320@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Tobias Geerinckx-Rice X-Debbugs-Original-Xcc: Tobias Geerinckx-Rice Received: via spool by 63320-submit@debbugs.gnu.org id=B63320.16833228582035 (code B ref 63320); Fri, 05 May 2023 21:41:02 +0000 Received: (at 63320) by debbugs.gnu.org; 5 May 2023 21:40:58 +0000 Received: from localhost ([127.0.0.1]:57678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv3Af-0000Wf-4J for submit@debbugs.gnu.org; Fri, 05 May 2023 17:40:58 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42068) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv3Ad-0000WI-Ab for 63320@debbugs.gnu.org; Fri, 05 May 2023 17:40:56 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv3AW-0001GK-PT; Fri, 05 May 2023 17:40:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=uQyS+fgbCAdQs2drO0kv0W2Jnj0sDs1tgCUGVqpNSEA=; b=CzG8cjZQwLQS+XECXFmA vmgVrenFk6GDpv4kxND7dnr7OXA3bJrReOdUOJHe5tNUs8WV2f5Q0JueZZOdo7X0vgE8R9O9u9qSH UT2FHgWlZk9RhO1fs5lEYsibxHXCsbX5iCiBqAeowzFPv0F8WfO+A11XGuVcJD9CdXc55uQVjPgwR jQLeuaVoN0//gYWSNZ+Vsb2e01tJL2waDlh30MRfElT5IZzEb7G97QPRH4CRjhJ/yB28HDMyTkpWd kmtxzNQa8dUZfRJA7STO6RaIkd5S6M6GUYqdaBBkfvk9kaWyFjepKc70z6TNnx/tbXUmQ0+rRR7D2 1P7+h/ywM/Bf5A==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv39z-0006Bu-P2; Fri, 05 May 2023 17:40:39 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 5 May 2023 23:40:04 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * guix/scripts/style.scm (unquote->ungexp, gexpify-argument-value) (quote-argument-value, gexpify-argument-tail) (gexpify-package-arguments): New procedures. (%gexp-keywords): New variable. (%options): Add "arguments" case for 'styling-procedure. (show-stylings): Update. * tests/style.scm ("gexpify arguments, already gexpified") ("gexpify arguments, non-gexp arguments, margin comment") ("gexpify arguments, phases and flags") ("gexpify arguments, append arguments") ("gexpify arguments, substitute-keyword-arguments") ("gexpify arguments, append substitute-keyword-arguments"): New tests. * doc/guix.texi (package Reference): For 'arguments', add compatibility note and link to 'guix style'. (Invoking guix style): Document the 'arguments' styling rule. --- doc/guix.texi | 51 ++++++++++++ guix/scripts/style.scm | 173 ++++++++++++++++++++++++++++++++++++++++- tests/style.scm | 136 ++++++++++++++++++++++++++++++++ 3 files changed, 359 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 55221a10c3..12d7e02bca 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -7743,6 +7743,24 @@ package Reference @code{#:phases}. The @code{#:phases} keyword in particular lets you modify the set of build phases for your package (@pxref{Build Phases}). +@quotation Compatibility Note +Until version 1.3.0, the @code{arguments} field would typically use +@code{quote} (@code{'}) or @code{quasiquote} (@code{`}) and no +G-expressions, like so: + +@lisp +(package + ;; several fields omitted + (arguments ;old-style quoted arguments + '(#:tests? #f + #:configure-flags '("--enable-frobbing")))) +@end lisp + +To convert from that style to the one shown above, you can run +@code{guix style -S arguments @var{package}} (@pxref{Invoking guix +style}). +@end quotation + @item @code{inputs} (default: @code{'()}) @itemx @code{native-inputs} (default: @code{'()}) @itemx @code{propagated-inputs} (default: @code{'()}) @@ -14657,6 +14675,39 @@ Invoking guix style out if it cannot make sense of the code that appears in an inputs field. The @option{--input-simplification} option described below provides fine-grain control over when inputs should be simplified. + +@item arguments +Rewrite package arguments to use G-expressions (@pxref{G-Expressions}). +For example, consider this package definition: + +@lisp +(define-public my-package + (package + ;; @dots{} + (arguments ;old-style quoted arguments + '(#:make-flags '("V=1") + #:phases (modify-phases %standard-phases + (delete 'build)))))) +@end lisp + +@noindent +Running @command{guix style -S arguments} on this package would rewrite +its @code{arguments} field like to: + +@lisp +(define-public my-package + (package + ;; @dots{} + (arguments + (list #:make-flags #~'("V=1") + #:phases #~(modify-phases %standard-phases + (delete 'build)))))) +@end lisp + +Note that changes made by the @code{arguments} rule do not entail a +rebuild of the affected packages. Furthermore, if a package definition +happens to be using G-expressions already, @command{guix style} leaves +it unchanged. @end table @item --list-stylings diff --git a/guix/scripts/style.scm b/guix/scripts/style.scm index 00c7d3f90c..1d02742524 100644 --- a/guix/scripts/style.scm +++ b/guix/scripts/style.scm @@ -41,6 +41,7 @@ (define-module (guix scripts style) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-37) #:export (guix-style)) @@ -302,6 +303,174 @@ (define* (simplify-package-inputs package (list package-inputs package-native-inputs package-propagated-inputs))) + +;;; +;;; Gexpifying package arguments. +;;; + +(define (unquote->ungexp value) + "Replace 'unquote' and 'unquote-splicing' in VALUE with their gexp +counterpart." + ;; Replace 'unquote only on the first quasiquotation level. + (let loop ((value value) + (quotation 1)) + (match value + (('unquote x) + (if (= quotation 1) + `(ungexp ,x) + value)) + (('unquote-splicing x) + (if (= quotation 1) + `(ungexp-splicing x) + value)) + (('quasiquote x) + (list 'quasiquote (loop x (+ quotation 1)))) + (('quote x) + (list 'quote (loop x (+ quotation 1)))) + ((lst ...) + (map (cut loop <> quotation) lst)) + (x x)))) + +(define (gexpify-argument-value value quotation) + "Turn VALUE, an sexp, into its gexp equivalent. QUOTATION is a symbol that +indicates in what quotation context VALUE is to be interpreted: 'quasiquote, +'quote, or 'none." + (match quotation + ('none + (match value + (('quasiquote value) + (gexpify-argument-value value 'quasiquote)) + (('quote value) + (gexpify-argument-value value 'quote)) + (value value))) + ('quote + `(gexp ,value)) + ('quasiquote + `(gexp ,(unquote->ungexp value))))) + +(define (quote-argument-value value quotation) + "Quote VALUE, an sexp. QUOTATION is a symbol that indicates in what +quotation context VALUE is to be interpreted: 'quasiquote, 'quote, or 'none." + (define (self-quoting? x) + (or (boolean? x) (number? x) (string? x) (char? x) + (keyword? x))) + + (match quotation + ('none + (match value + (('quasiquote value) + (quote-argument-value value 'quasiquote)) + (('quote value) + (quote-argument-value value 'quote)) + (value value))) + ('quote + (if (self-quoting? value) + value + (list 'quote value))) + ('quasiquote + (match value + (('unquote x) x) + ((? self-quoting? x) x) + (_ (list 'quasiquote value)))))) + +(define %gexp-keywords + ;; Package argument keywords that must be followed by a gexp. + '(#:phases #:configure-flags #:make-flags #:strip-flags)) + +(define (gexpify-argument-tail sexp) + "Gexpify SEXP, an unquoted argument tail." + (match sexp + (('substitute-keyword-arguments lst clauses ...) + `(substitute-keyword-arguments ,lst + ,@(map (match-lambda + ((((? keyword? keyword) identifier) body) + `((,keyword ,identifier) + ,(if (memq keyword %gexp-keywords) + (gexpify-argument-value body 'none) + (quote-argument-value body 'none)))) + ((((? keyword? keyword) identifier default) body) + `((,keyword ,identifier + ,(if (memq keyword %gexp-keywords) + (gexpify-argument-value default 'none) + (quote-argument-value default 'none))) + ,(if (memq keyword %gexp-keywords) + (gexpify-argument-value body 'none) + (quote-argument-value body 'none)))) + (clause clause)) + clauses))) + (_ sexp))) + +(define* (gexpify-package-arguments package + #:key + (policy 'none) + (edit-expression edit-expression)) + "Rewrite the 'arguments' field of PACKAGE to use gexps where applicable." + (define (gexpify location str) + (match (call-with-input-string str read-with-comments) + ((rest ...) + (let ((blanks (take-while blank? rest)) + (value (drop-while blank? rest))) + (define-values (quotation arguments tail) + (match value + (('quote (arguments ...)) (values 'quote arguments '())) + (('quasiquote (arguments ... ('unquote-splicing tail))) + (values 'quasiquote arguments tail)) + (('quasiquote (arguments ...)) (values 'quasiquote arguments '())) + (('list arguments ...) (values 'none arguments '())) + (arguments (values 'none '() arguments)))) + + (define (append-tail sexp) + (if (null? tail) + sexp + (let ((tail (gexpify-argument-tail tail))) + (if (null? arguments) + tail + `(append ,sexp ,tail))))) + + (let/ec return + (object->string* + (append-tail + `(list ,@(let loop ((arguments arguments) + (result '())) + (match arguments + (() (reverse result)) + (((? keyword? keyword) value rest ...) + (when (eq? quotation 'none) + (match value + (('gexp _) ;already gexpified + (return str)) + (_ #f))) + + (loop rest + (cons* (if (memq keyword %gexp-keywords) + (gexpify-argument-value value + quotation) + (quote-argument-value value quotation)) + keyword result))) + (((? blank? blank) rest ...) + (loop rest (cons blank result))) + (_ + ;; Something like: ,@(package-arguments xyz). + (warning location + (G_ "unsupported argument style; \ +bailing out~%")) + (return str)))))) + (location-column location))))) + (_ + (warning location + (G_ "unsupported argument field; bailing out~%")) + str))) + + (unless (null? (package-arguments package)) + (match (package-field-location package 'arguments) + (#f + #f) + (location + (edit-expression + (location->source-properties (absolute-location location)) + (lambda (str) + (gexpify location str))))))) + ;;; ;;; Formatting package definitions. @@ -379,6 +548,7 @@ (define %options (alist-cons 'styling-procedure (match arg ("inputs" simplify-package-inputs) + ("arguments" gexpify-package-arguments) ("format" format-package-definition) (_ (leave (G_ "~a: unknown styling~%") arg))) @@ -407,7 +577,8 @@ (define %options (define (show-stylings) (display (G_ "Available styling rules:\n")) (display (G_ "- format: Format the given package definition(s)\n")) - (display (G_ "- inputs: Rewrite package inputs to the “new style”\n"))) + (display (G_ "- inputs: Rewrite package inputs to the “new style”\n")) + (display (G_ "- arguments: Rewrite package arguments to G-expressions\n"))) (define (show-help) (display (G_ "Usage: guix style [OPTION]... [PACKAGE]... diff --git a/tests/style.scm b/tests/style.scm index f141a57d7f..5e38549606 100644 --- a/tests/style.scm +++ b/tests/style.scm @@ -386,6 +386,142 @@ (define* (read-package-field package field #:optional (count 1)) (list (package-inputs (@ (my-packages) my-coreutils)) (read-package-field (@ (my-packages) my-coreutils) 'inputs 4))))) +(test-assert "gexpify arguments, already gexpified" + (call-with-test-package '((arguments + (list #:configure-flags #~'("--help")))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + (define (fingerprint file) + (let ((stat (stat file))) + (list (stat:mtime stat) (stat:size stat)))) + (define before + (fingerprint file)) + + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (equal? (fingerprint file) before)))) + +(test-equal "gexpify arguments, non-gexp arguments, margin comment" + (list (list #:tests? #f #:test-target "check") + "\ + (arguments (list #:tests? #f ;no tests + #:test-target \"check\"))\n") + (call-with-test-package '((arguments + '(#:tests? #f + #:test-target "check"))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + + (substitute* file + (("#:tests\\? #f" all) + (string-append all " ;no tests\n"))) + + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (load file) + (list (package-arguments (@ (my-packages) my-coreutils)) + (read-package-field (@ (my-packages) my-coreutils) 'arguments 2))))) + +(test-equal "gexpify arguments, phases and flags" + "\ + (list #:tests? #f + #:configure-flags #~'(\"--fast\") + #:make-flags #~(list (string-append \"CC=\" + #$(cc-for-target))) + #:phases #~(modify-phases %standard-phases + ;; Line comment. + whatever)))\n" + (call-with-test-package '((arguments + `(#:tests? #f + #:configure-flags '("--fast") + #:make-flags + (list (string-append "CC=" ,(cc-for-target))) + #:phases (modify-phases %standard-phases + whatever)))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + + (substitute* file + (("whatever") + "\n;; Line comment. + whatever")) + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (load file) + (read-package-field (@ (my-packages) my-coreutils) 'arguments 7)))) + +(test-equal "gexpify arguments, append arguments" + "\ + (append (list #:tests? #f + #:configure-flags #~'(\"--fast\")) + (package-arguments coreutils)))\n" + (call-with-test-package '((arguments + `(#:tests? #f + #:configure-flags '("--fast") + ,@(package-arguments coreutils)))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (load file) + (read-package-field (@ (my-packages) my-coreutils) 'arguments 3)))) + +(test-equal "gexpify arguments, substitute-keyword-arguments" + "\ + (substitute-keyword-arguments (package-arguments coreutils) + ((#:tests? _ #f) + #t) + ((#:make-flags flags + #~'()) + #~(cons \"-DXYZ=yes\" + #$flags))))\n" + (call-with-test-package '((arguments + (substitute-keyword-arguments + (package-arguments coreutils) + ((#:tests? _ #f) #t) + ((#:make-flags flags ''()) + `(cons "-DXYZ=yes" ,flags))))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (load file) + (read-package-field (@ (my-packages) my-coreutils) 'arguments 7)))) + +(test-equal "gexpify arguments, append substitute-keyword-arguments" + "\ + (append (list #:tests? #f) + (substitute-keyword-arguments (package-arguments coreutils) + ((#:make-flags flags) + #~(append `(\"-n\" ,%output) + #$flags)))))\n" + (call-with-test-package '((arguments + `(#:tests? #f + ,@(substitute-keyword-arguments + (package-arguments coreutils) + ((#:make-flags flags) + `(append `("-n" ,%output) ,flags)))))) + (lambda (directory) + (define file + (string-append directory "/my-packages.scm")) + + (system* "guix" "style" "-L" directory "my-coreutils" + "-S" "arguments") + + (load file) + (read-package-field (@ (my-packages) my-coreutils) 'arguments 5)))) (test-end) From patchwork Fri May 5 21:40:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 49822 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1FDAE27BBE9; Fri, 5 May 2023 22:41:40 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 153A627BBE2 for ; Fri, 5 May 2023 22:41:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pv3As-0005yY-OE; Fri, 05 May 2023 17:41:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv3Am-0005xf-I6 for guix-patches@gnu.org; Fri, 05 May 2023 17:41:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pv3Am-0001Kt-8L for guix-patches@gnu.org; Fri, 05 May 2023 17:41:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pv3Ak-0000XB-4l; Fri, 05 May 2023 17:41:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63320] [PATCH 2/2] DRAFT news: Add entry to 'guix style -S arguments'. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: julien@lepiller.eu, guix-patches@gnu.org Resent-Date: Fri, 05 May 2023 21:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63320 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63320@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Julien Lepiller X-Debbugs-Original-Xcc: Julien Lepiller Received: via spool by 63320-submit@debbugs.gnu.org id=B63320.16833228572028 (code B ref 63320); Fri, 05 May 2023 21:41:02 +0000 Received: (at 63320) by debbugs.gnu.org; 5 May 2023 21:40:57 +0000 Received: from localhost ([127.0.0.1]:57676 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv3Ae-0000Wd-QX for submit@debbugs.gnu.org; Fri, 05 May 2023 17:40:57 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42060) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv3Ad-0000WH-96 for 63320@debbugs.gnu.org; Fri, 05 May 2023 17:40:55 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv3AX-0001Gg-Jz; Fri, 05 May 2023 17:40:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=/FYLqIwBrQzoZd57i56nUsjfd10jOyF6CsQE6i8Q1m8=; b=OOW53PMrMKKcH7/bphm2 8qftzct1gCSnnxsD1179OMZxqvUxcwmeCCZM8nuuhMYeHUNvt8O5drfaBOGe26d41qAe9sdq9GbOv hzk5m33b4fhJK3NrkPdgl66CkljE40xEPSuCc3doodH/5QCmuTSSuUVex5M0Fe6XR6tBrW/WLFfsL OWD9TyNrnSLvDzJ+wT2yuCvAGGQfpsMOexm60ypgDK/34gKbURc4o1PLsbd/FUhIoMZXTT1v8n7aT fx13YTFSlLCdWJM6Xa5XwuE4p28LFeCcTBnH/W0TQyw9ZCRwtpwuWgbuGwE9oan8wJpeeQFUW2E65 88V6eDzGOJHEtA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv3AX-0006Bu-5o; Fri, 05 May 2023 17:40:49 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 5 May 2023 23:40:05 +0200 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches DRAFT: Missing commit ID. * etc/news.scm: Add entry. --- etc/news.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 22f04e4dae..41a03405a7 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -26,6 +26,22 @@ (channel-news (version 0) + (entry (commit "FIXME") + (title + (en "New @code{arguments} rule for @command{guix style}")) + (body + (en "The @command{guix style} command has a new @dfn{styling rule} +for package definitions. Package writers may now run the following command: + +@example +guix style -L /path/to/channel -S arguments @var{package} +@end example + +This command rewrites the @code{arguments} field of @var{package} so that it +uses G-expressions instead of classical quasiquotation. + +Run @command{info \"(guix) Invoking guix style\"} for more info."))) + (entry (commit "ae11fcb84ac478dfa56d322ef08890645183a087") (title (en "New @option{--with-configure-flag} transformation option")