From: ludo@gnu.org (Ludovic Courtès)
To: Federico Beffa <beffa@ieee.org>
Cc: 21829@debbugs.gnu.org
Subject: bug#21829: guix import hackage failures
Date: Wed, 25 Nov 2015 22:45:15 +0100 [thread overview]
Message-ID: <87fuztda8k.fsf@gnu.org> (raw)
In-Reply-To: <CAKrPhPMG5yn-Pck3CeK5X3icCXfYCToc2S_2W8NLp7ezwGVUiw@mail.gmail.com> (Federico Beffa's message of "Wed, 25 Nov 2015 17:55:28 +0100")
Federico Beffa <beffa@ieee.org> skribis:
> On Sun, Nov 15, 2015 at 9:59 PM, Ludovic Courtès <ludo@gnu.org> wrote:
>> Federico Beffa <beffa@ieee.org> skribis:
>>> * guix/import/cabal.scm (lex-word): Add support for tests with no spaces.
>>> (impl): Fix handling of operator "==".
>>
>> LGTM, but I think it’d be great to add a test that illustrates the case
>> that this fixes (and to make sure it doesn’t come back later.)
>
> I've rewritten 'impl' and the new test that I've added covers this and more.
Great, thanks for following up!
>>> + ;; indentation based block recognition.
>>> + (begin (unread-char #\newline port) (read-char port) 0)
>>
>> Isn’t this equivalent to: 0 ?
>
> No. This is because at the start of a new line we check if and how
> many indentation blocks have ended. If the last line doesn't terminate
> this check is no done.
More generally, it looks like:
(begin (do-effect!) (undo-effect!) val)
which I thought reduces to:
val
Oh well, not crucial.
> From d13f06383d07e0ad4096ff7eb715264463738b0c Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 11 Nov 2015 10:39:38 +0100
> Subject: [PATCH 1/8] import: hackage: Add recognition of 'true' and 'false'
> symbols.
>
> * guix/import/cabal.scm (is-true, is-false, lex-true, lex-false): New procedures.
> (lex-word): Use them.
> (make-cabal-parser): Add TRUE and FALSE tokens.
> (eval): Add entries for 'true and 'false symbols.
OK.
In general I think development, review, and quality benefit from adding
a test alongside a feature or bug-fix, even a small one like this (as
opposed to adding a test separately.) We try to do this for the rest of
the repo.
Now, I don’t want to bother you more ;-), and the test added by the last
patch covers some of this, so that’s OK.
> From d96a655a232ba77d7d71a5227c6d3c8bc8b983cc Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 11 Nov 2015 11:22:42 +0100
> Subject: [PATCH 2/8] import: hackage: Imporve parsing of tests.
>
> * guix/import/cabal.scm (lex-word): Add support for tests with no spaces.
> (impl): Rewrite.
OK.
> From 614f9a9b685bcefa4e355b8c259225b0f098bc72 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 11 Nov 2015 15:31:46 +0100
> Subject: [PATCH 3/8] import: hackage: Make it resilient to missing final
> newline.
>
> * guix/import/cabal.scm (peek-next-line-indent): Check for missing final
> newline.
OK.
> From 81e55b496195cc9e9aa41a2cf57117326cf93245 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 11 Nov 2015 16:20:45 +0100
> Subject: [PATCH 4/8] import: hackage: Make parsing of tests and fields more
> flexible.
>
> * guix/import/cabal.scm (is-test): Allow spaces between keyword and
> parentheses.
> (is-id): Add argument 'port'. Allow spaces between keyword and column.
> (lex-word): Adjust call to 'is-id'.
LGTM.
> From bdd4aa18e3f3a686ceae9040c8b7404984886ace Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Sat, 14 Nov 2015 15:00:36 +0100
> Subject: [PATCH 5/8] utils: Add 'canonical-newline-port'.
>
> * guix/utils.scm (canonical-newline-port): New procedure.
> * tests/utils.scm ("canonical-newline-port"): New test.
OK.
> From 32b848e0506d6deac0bd1130234e02fb645613ee Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Sat, 14 Nov 2015 15:15:00 +0100
> Subject: [PATCH 6/8] import: hackage: Handle CRLF end of line style.
>
> * guix/import/hackage.scm (hackage-fetch, hackage->guix-package): Use
> 'canonical-newline-port'.
OK.
> From 507404c508774e5edb1cda1027fee12dae263592 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 25 Nov 2015 14:47:16 +0100
> Subject: [PATCH 8/8] import: hackage: Assume current 'ghc' package version.
>
> * guix/scripts/import/hackage.scm (%default-options): Do it.
> (ghc-default-version): New variable.
OK.
> From bf0bc66ace3b2617178c28d9635dbb4bc3a89ce9 Mon Sep 17 00:00:00 2001
> From: Federico Beffa <beffa@fbengineering.ch>
> Date: Wed, 25 Nov 2015 13:58:06 +0100
> Subject: [PATCH 7/8] import: hackage: Add new tests.
>
> * tests/hackage.scm (eval-test-with-cabal): Add optional argument.
> (test-cabal-3): New variable and test.
> (test-read-cabal-1): Exercise more parsing variants.
OK.
Please add “Partly fixes <http://bugs.gnu.org/21829>.” or “Fixes
<http://bugs.gnu.org/21829>.” in the commit logs as appropriate (see
past commits for examples.)
Thank you for the hard work!
Ludo’.
next prev parent reply other threads:[~2015-11-25 21:46 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 15:00 bug#21829: guix import hackage failures Paul van der Walt
2015-11-04 23:11 ` Ludovic Courtès
2015-11-10 16:40 ` Federico Beffa
2015-11-11 11:18 ` Ludovic Courtès
2015-11-11 21:29 ` Federico Beffa
2015-11-12 9:07 ` Ludovic Courtès
2015-11-12 16:54 ` Federico Beffa
2015-11-12 20:21 ` Ludovic Courtès
2015-11-13 17:08 ` Federico Beffa
2015-11-13 21:19 ` Ludovic Courtès
2015-11-14 14:37 ` Federico Beffa
2015-11-15 20:59 ` Ludovic Courtès
2015-11-25 16:55 ` Federico Beffa
2015-11-25 21:45 ` Ludovic Courtès [this message]
2015-11-26 8:28 ` Federico Beffa
2015-11-26 8:46 ` Ludovic Courtès
2015-11-26 17:23 ` Federico Beffa
2015-11-26 19:56 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fuztda8k.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=21829@debbugs.gnu.org \
--cc=beffa@ieee.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.