unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Grigory Shepelev <shegeley@gmail.com>,
	Maxime Devos <maximedevos@telenet.be>
Cc: 52801@debbugs.gnu.org
Subject: bug#52801: Guile misbehaves in case of escapes and carriage returns, sometimes breaking "guix pull"
Date: Sun, 30 Jan 2022 18:52:18 +0100	[thread overview]
Message-ID: <87h79l9kml.fsf@gnu.org> (raw)
In-Reply-To: <CAGJuR-5kOYCLNF6Qe6Omr+tH_AHfH30KKc8XDrpH3SKwTJH=mQ@mail.gmail.com> (Grigory Shepelev's message of "Sun, 26 Dec 2021 13:14:23 +0300")

Hi,

Grigory Shepelev <shegeley@gmail.com> skribis:

> shegeley@zone51 ~$ guix pull
> Updating channel 'nonguix' from Git repository at 'https://gitlab.com/nonguix/nonguix'...
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> Building from these channels:
>   guix      https://git.savannah.gnu.org/git/guix.git	2495582
>   nonguix   https://gitlab.com/nonguix/nonguix	39e4b41
> Computing Guix derivation for 'x86_64-linux'... -ice-9/read.scm:126:4: In procedure read-string:
> gnu/packages/virtualization.scm:640:1: invalid character in escape sequence: #\return
> guix pull: error: You found a bug: the program '/gnu/store/w1hd6ab7f92y0f2r1ah4yyvi205a71bc-compute-guix-derivation'
> failed to compute the derivation for Guix (version: "2495582e08cf411163f0799d290fda5101141949"; system: "x86_64-linux";
> host version: "1dfe8c372163d481ebebb97dd3b4cafa49906b28"; pull-version: 1).

Maxime Devos <maximedevos@telenet.be> skribis:

> Seems like an instance of <https://issues.guix.gnu.org/52559#15>.
> I took the liberty of renaming the bug report appropriately.
>
> Anyway, here's the minimal reproducer:
>
> Run the following in a REPL:
> (call-with-input-string "\"Hello\\\rcarriage return!\"" read)
> ;; --> invalid character in escape sequence: #\return

That’s expected.  Conversely, this one works:

  (call-with-input-string "\"Hello \\\nnewline!\"" read)

What was in gnu/packages/virtualization.scm:640:1 at that point?

--8<---------------cut here---------------start------------->8---
$ git ls-tree 2495582e08cf411163f0799d290fda5101141949 -- gnu/packages
040000 tree 8070c9587f76797cf16800522688ded39c956d00	gnu/packages
$ git ls-tree 8070c9587f76797cf16800522688ded39c956d00 |grep virtuali
100644 blob 20ffb4a481239349078e2a2864d1bd873dfcd143	virtualization.scm
$ git show 20ffb4a481239349078e2a2864d1bd873dfcd143 |head -649 |tail -10
                "/run/setuid-programs:/run/current-system/profile/sbin:\
/run/current-system/profile/bin"))))
         (add-after 'bootstrap 'patch-sphinx-version-detection
           (lambda _
             ;; The build system runs 'sphinx-build --version' to verify that
             ;; the Sphinx is recent enough, but does not expect the
             ;; .sphinx-build-real executable name created by the Sphinx wrapper.
             (substitute* "configure"
               (("\\$SPHINX --version 2>&1")
                "$SPHINX --version 2>&1 \
--8<---------------cut here---------------end--------------->8---

AFAICS, this was a regular \n (not \r) following backslash.

Did the issue magically disappear?

Grigory, could it be that libgit2 somehow converted \n to \r\n on your
machine, or that you manually accesses files under
~/.cache/guix/checkouts?

Thanks,
Ludo’.




  parent reply	other threads:[~2022-01-30 17:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-26 10:14 bug#52801: Bug report Grigory Shepelev
2021-12-26 11:22 ` bug#52801: Guile inconsistently misbehaves in case of escapes and carriage returns, breaking "guix pull" Maxime Devos
2022-01-30 17:52 ` Ludovic Courtès [this message]
2022-01-30 19:45   ` bug#52801: Guile misbehaves in case of escapes and carriage returns, sometimes " Grigory Shepelev
2022-01-30 19:47     ` Grigory Shepelev
2022-01-30 21:06     ` Maxime Devos
2022-01-31 12:48       ` Grigory Shepelev
2022-01-31 13:20         ` Maxime Devos
2022-02-01  8:48       ` 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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h79l9kml.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=52801@debbugs.gnu.org \
    --cc=maximedevos@telenet.be \
    --cc=shegeley@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).