GNU bug report logs -
#21829
guix import hackage failures
Previous Next
Full log
Message #14 received at 21829 <at> debbugs.gnu.org (full text, mbox):
Federico Beffa <beffa <at> 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?
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’.
This bug report was last modified 9 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.