From: Federico Beffa <beffa@ieee.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 21829@debbugs.gnu.org
Subject: bug#21829: guix import hackage failures
Date: Wed, 11 Nov 2015 22:29:20 +0100 [thread overview]
Message-ID: <CAKrPhPNfBuoT3XAjL8z2sAYW+Wm-b28opCJHEW+y9oQXSzWaSw@mail.gmail.com> (raw)
In-Reply-To: <87d1vghjhk.fsf@gnu.org>
On Wed, Nov 11, 2015 at 12:18 PM, Ludovic Courtès <ludo@gnu.org> wrote:
> Federico Beffa <beffa@ieee.org> skribis:
>
>> * I do not get backtraces, but the following error:
>
> The backtrace thing was fixed in 5453de3d.
>
>> * The following packages fail because the file has DOS line endings:
>>
>> happy, base-compat, base-orphans, fast-logger, generic-deriving, ObjectName,
>> SDL, setenv, split, StateVar, syb, transformers-base, wai, xmonad (+ 1 more
>> problem), zlib (+ 1 more problem).
>>
>> Changing the encoding to UNIX line endings fixes the problem. This is
>> the number 1 problem. Is there a Guile way to easily fix this?
>
> Could you explain how if fails exactly?
The extra character '\r' screws up the parsing because it was not
accounted for in the logic to recognize multi-line values and
indentation based block separation.
What do you think of a kind of piped filter as follows:
(define (call-with-input-file-eol-crlf->lf proc port)
(let* ((port-pair (pipe))
(input-port (match port-pair ((in . out) in)))
(output-port (match port-pair ((in . out) out))))
(letpar ((transcoder
(let loop ((line (get-line port)))
(unless (eof-object? line)
(write-line (string-trim-right line #\return) output-port)
(loop (get-line port)))
(flush-output-port output-port)))
(result (proc input-port)))
(close-output-port output-port)
(close-input-port input-port)
result)))
Then instead of calling (read-cabal port) I would call
(call-with-input-file-eol-crlf->lf read-cabal port).
Regards,
Fede
next prev parent reply other threads:[~2015-11-11 21:30 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 [this message]
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
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=CAKrPhPNfBuoT3XAjL8z2sAYW+Wm-b28opCJHEW+y9oQXSzWaSw@mail.gmail.com \
--to=beffa@ieee.org \
--cc=21829@debbugs.gnu.org \
--cc=ludo@gnu.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.