bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21829: guix import hackage failures


From: Ludovic Courtès
Subject: bug#21829: guix import hackage failures
Date: Wed, 11 Nov 2015 12:18:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Federico Beffa <address@hidden> 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?

Not really “easily” unfortunately.  It depends on the APIs you use.

There’s the R6RS API from (rnrs io ports), which is supposed to
magically do line ending conversion but doesn’t seem to work:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (make-transcoder (utf-8-codec) (eol-style crlf))
$13 = #<r6rs:record:transcoder>
scheme@(guile-user)> (transcoded-port (open-string-input-port "foo\n\rbar\n\r") 
$13)
$14 = #<input: r6rs-transcoded-port 60725b0>
scheme@(guile-user)> (get-line $14)
$15 = "foo"
scheme@(guile-user)> (get-line $14)
$16 = "\rbar"
scheme@(guile-user)> (get-line $14)
$17 = "\r"
--8<---------------cut here---------------end--------------->8---

But then there are things like ‘string-tokenize’ that do the right
thing:

--8<---------------cut here---------------start------------->8---
scheme@(guile-user)> (string-tokenize "foo\n\rbar\n\rbaz")
$18 = ("foo" "bar" "baz")
--8<---------------cut here---------------end--------------->8---

Thanks,
Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]