GNU bug report logs - #56898
[PATCH 00/13] Put the pretty printer to good use

Previous Next

Package: guix-patches;

Reported by: Ludovic Courtès <ludo <at> gnu.org>

Date: Tue, 2 Aug 2022 21:43:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#56898: closed ([PATCH 00/13] Put the pretty printer to good use)
Date: Tue, 09 Aug 2022 09:43:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 09 Aug 2022 11:42:23 +0200
with message-id <87mtcd92io.fsf <at> gnu.org>
and subject line Re: bug#56898: [PATCH 00/13] Put the pretty printer to good use
has caused the debbugs.gnu.org bug report #56898,
regarding [PATCH 00/13] Put the pretty printer to good use
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
56898: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56898
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH 00/13] Put the pretty printer to good use
Date: Tue,  2 Aug 2022 23:42:36 +0200
Hello Guix!

I shaved a yak!  This patch series promotes the pretty reader/printer
of ‘guix style’ to its own module, improves it so it can deal with
vertical space, adds a ‘-f’ option to ‘guix style’ to reformat
whole files, changes the installer to use this pretty-printer, and
changes the installer so it emits comments and vertical space in
the generated configuration.

You can use ‘guix style -f’ on any Scheme file.  The pretty-printer
does a decent job, though there are still cases where it’s not as
good as my little hands at formatting things nicely.  For newcomers,
it should be very helpful.

Comments?  Vertical space?  Page breaks?

Ludo’.

Ludovic Courtès (13):
  style: Move reader and printer to (guix read-print).
  read-print: Add System and Home special forms.
  read-print: Expose comment constructor.
  read-print: Introduce <blank> parent class of <comment>.
  style: Adjust test to not emit blank lines.
  read-print: Read and render vertical space.
  read-print: Recognize page breaks.
  read-print: Add code to read and write sequences of
    expressions/blanks.
  read-print: 'canonicalize-comment' leaves top-level comments
    unchanged.
  style: Add '--whole-file' option.
  read-print: Support printing multi-line comments.
  installer: Render the final configuration with (guix read-print).
  installer: Add comments and vertical space to the generated config.

 Makefile.am                |   3 +
 doc/guix.texi              |  28 +-
 gnu/installer.scm          |   3 +-
 gnu/installer/parted.scm   |  10 +-
 gnu/installer/services.scm |  39 ++-
 gnu/installer/steps.scm    |  32 +-
 gnu/installer/user.scm     |   7 +-
 guix/read-print.scm        | 678 +++++++++++++++++++++++++++++++++++++
 guix/scripts/import.scm    |   4 +-
 guix/scripts/style.scm     | 527 +++-------------------------
 tests/guix-style.sh        |  80 +++++
 tests/read-print.scm       | 358 ++++++++++++++++++++
 tests/style.scm            | 185 +---------
 13 files changed, 1270 insertions(+), 684 deletions(-)
 create mode 100644 guix/read-print.scm
 create mode 100644 tests/guix-style.sh
 create mode 100644 tests/read-print.scm


base-commit: d7e7494bc4d69de9db49488ee812e572c3250211
-- 
2.37.1



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: 56898-done <at> debbugs.gnu.org
Subject: Re: bug#56898: [PATCH 00/13] Put the pretty printer to good use
Date: Tue, 09 Aug 2022 11:42:23 +0200
Ludovic Courtès <ludo <at> gnu.org> skribis:

>   style: Move reader and printer to (guix read-print).
>   read-print: Add System and Home special forms.
>   read-print: Expose comment constructor.
>   read-print: Introduce <blank> parent class of <comment>.
>   style: Adjust test to not emit blank lines.
>   read-print: Read and render vertical space.
>   read-print: Recognize page breaks.
>   read-print: Add code to read and write sequences of
>     expressions/blanks.
>   read-print: 'canonicalize-comment' leaves top-level comments
>     unchanged.
>   style: Add '--whole-file' option.
>   read-print: Support printing multi-line comments.
>   installer: Render the final configuration with (guix read-print).
>   installer: Add comments and vertical space to the generated config.

Oops, forgot to close: I pushed this series as
ff9522fb69b9f4a31a5b766029e26dc53a2d1cf8 yesterday.

Lemme know how it goes!

Ludo’.


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

Previous Next


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