GNU bug report logs - #48700
guix import fails with unexpected token

Previous Next

Package: guix;

Reported by: "Philip Munksgaard" <philip <at> munksgaard.me>

Date: Thu, 27 May 2021 14:47:01 UTC

Severity: normal

Merged with 48701

Done: "Philip Munksgaard" <philip <at> munksgaard.me>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48700 in the body.
You can then email your comments to 48700 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 27 May 2021 14:47:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Philip Munksgaard" <philip <at> munksgaard.me>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 27 May 2021 14:47:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: bug-guix <at> gnu.org
Subject: guix import fails with unexpected token
Date: Thu, 27 May 2021 15:08:30 +0200
Trying to to import futhark from hackage fails, when using the -r flag.

$ guix import hackage -r futhark
user with UID 497492280 not found

Starting download of /tmp/guix-file.MqWnPq
From https://hackage.haskell.org/package/futhark/futhark-0.19.5.tar.gz...
 …19.5.tar.gz  959KiB                 6.6MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.ZPWyOq
From https://hackage.haskell.org/package/bytestring-to-vector/bytestring-to-vector-0.3.0.1.tar.gz...
 …tor-0.3.0.1.tar.gz  4KiB            9.4MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.bjbYYp
From https://hackage.haskell.org/package/bmp/bmp-1.2.6.3.tar.gz...
 ….3.tar.gz  10KiB                   23.7MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.uhGsUr
From https://hackage.haskell.org/package/directory-tree/directory-tree-0.12.1.tar.gz...
 …-0.12.1.tar.gz  12KiB              15.1MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.SUjZRr
From https://hackage.haskell.org/package/language-c-quote/language-c-quote-0.13.tar.gz...
 …te-0.13.tar.gz  74KiB               4.2MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.W3CjMq
From https://hackage.haskell.org/package/mainland-pretty/mainland-pretty-0.7.1.tar.gz...
 …y-0.7.1.tar.gz  10KiB              11.8MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.K7aEUp
From https://hackage.haskell.org/package/neat-interpolation/neat-interpolation-0.5.1.2.tar.gz...
 …on-0.5.1.2.tar.gz  6KiB             9.7MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.ovhTIs
From https://hackage.haskell.org/package/pcg-random/pcg-random-0.1.3.7.tar.gz...
 ….1.3.7.tar.gz  25KiB                3.5MiB/s 00:00 [##################] 100.0%
user with UID 497492280 not found

Starting download of /tmp/guix-file.nj5C8q
From https://hackage.haskell.org/package/srcloc/srcloc-0.6.tar.gz...
 ….6.tar.gz  4KiB                     9.9MiB/s 00:00 [##################] 100.0%
Syntax error: unexpected token : common (at line 36, column 0)
Syntax error: unexpected end of input
Backtrace:
In ice-9/boot-9.scm:
  1736:10 17 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
          16 (apply-smob/0 #<thunk 7fad568fb520>)
In ice-9/boot-9.scm:
    718:2 15 (call-with-prompt _ _ #<procedure default-prompt-handle…>)
In ice-9/eval.scm:
    619:8 14 (_ #(#(#<directory (guile-user) 7fad568fec80>)))
In guix/ui.scm:
  2166:12 13 (run-guix-command _ . _)
In guix/scripts/import.scm:
   120:11 12 (guix-import . _)
In guix/scripts/import/hackage.scm:
   132:26 11 (guix-import-hackage . _)
In guix/import/utils.scm:
   477:27 10 (recursive-import _ #:repo->guix-package _ #:guix-name _ …)
In srfi/srfi-1.scm:
   586:29  9 (map1 _)
   586:29  8 (map1 _)
   586:29  7 (map1 _)
   586:29  6 (map1 _)
   586:29  5 (map1 _)
   586:29  4 (map1 (("neat-interpolation" #f) ("pcg-random" #f) (…) …))
   586:29  3 (map1 (("pcg-random" #f) ("srcloc" #f) ("versions" #f)))
   586:29  2 (map1 (("srcloc" #f) ("versions" #f)))
   586:17  1 (map1 (("versions" #f)))
In guix/import/utils.scm:
   466:33  0 (lookup-node "versions" #f)

guix/import/utils.scm:466:33: In procedure lookup-node:
Wrong number of values returned to continuation (expected 2)




Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 27 May 2021 20:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: "Philip Munksgaard" <philip <at> munksgaard.me>
Cc: 48700 <at> debbugs.gnu.org
Subject: Re: bug#48700: guix import fails with unexpected token
Date: Thu, 27 May 2021 21:54:52 +0200
Hi,

On Thu, 27 May 2021 at 15:08, "Philip Munksgaard" <philip <at> munksgaard.me> wrote:
> Trying to to import futhark from hackage fails, when using the -r
> flag.

Thanks for the report.  I think it is the same as:

<http://issues.guix.gnu.org/issue/44115>


All the best,
simon.




Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Sun, 30 May 2021 16:40:01 GMT) Full text and rfc822 format available.

Message #11 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: 48700 <at> debbugs.gnu.org
Subject: guix import fails with unexpected token
Date: Sun, 30 May 2021 18:38:47 +0200
As far as I can tell, this is actually an instance of https://issues.guix.gnu.org/48701. You can close this issue in favor of that one.




Merged 48700 48701. Request was from Tobias Geerinckx-Rice <me <at> tobias.gr> to control <at> debbugs.gnu.org. (Sun, 30 May 2021 16:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 10 Jun 2021 09:50:02 GMT) Full text and rfc822 format available.

Message #16 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: "Philip Munksgaard" <philip <at> munksgaard.me>
Cc: 48700 <at> debbugs.gnu.org
Subject: Re: bug#48700: guix import fails with unexpected token
Date: Thu, 10 Jun 2021 11:41:11 +0200
Hi,

On Sun, 30 May 2021 at 18:38, "Philip Munksgaard" <philip <at> munksgaard.me> wrote:
> As far as I can tell, this is actually an instance of
> https://issues.guix.gnu.org/48701. You can close this issue in favor of that
> one.

From my understanding, no.  I propose to unmerge.  WDYT?

The bug#48700 is a duplicate of bug#44115 (recursive importers).  For
instance, a first attempt to fix it is proposed by patch#45984; a new
version should come soon. :-)

But bug#48701 is not related, instead it is related to the Cabal
implemented by Guix.


For instance, this works:

--8<---------------cut here---------------start------------->8---
for p in bytestring-to-vector bmp directory-tree language-c-quote mainland-pretty neat-interpolation pcg-random srcloc; \
do
  guix import hackage $p -r ;
done

guix import hackage futhark
--8<---------------cut here---------------end--------------->8---

i.e., the option recursive with ’futhark’ goes to ’recursive-import’
from (guix import utils) and the ’node’ is not always well-formed when
’lookup-node’ as explained in #44115 and #45984.


<http://issues.guix.gnu.org/issue/44115>
<http://issues.guix.gnu.org/issue/45984>

All the best,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 10 Jun 2021 12:22:02 GMT) Full text and rfc822 format available.

Message #19 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: 48700 <at> debbugs.gnu.org
Subject: Re: bug#48700: guix import fails with unexpected token
Date: Thu, 10 Jun 2021 14:20:54 +0200
Hi zimoun,

If I understand you correctly, you're saying that this issue is an instance of bug#44115 because we get a backtrace instead of a nice error. I agree that the backtrace is ugly, but in this case the error shouldn't happen at all because all the recursively imported packages exist.

The reason why the backtrace occurs is that the cabal-file for one of the recursively imported dependencies (versions) cannot be parsed using the current version of guix/import/cabal.scm. You'll find that `guix import hackage -r futhark` works as expected with the submitted patch#48943.

Furthermore, I actually think that a backtrace _is_ desirable in this case, because it is an error in the script, and not in the users input or some third-party repository.

As you say, your example works, but you've forgotten the "versions" dependency. If you add that to your list it will not work.

Best regards,
Philip




Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 10 Jun 2021 13:03:01 GMT) Full text and rfc822 format available.

Message #22 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: zimoun <zimon.toutoune <at> gmail.com>
To: Philip Munksgaard <philip <at> munksgaard.me>
Cc: 48700 <at> debbugs.gnu.org
Subject: Re: bug#48700: guix import fails with unexpected token
Date: Thu, 10 Jun 2021 15:02:07 +0200
Hi,

On Thu, 10 Jun 2021 at 14:22, Philip Munksgaard <philip <at> munksgaard.me> wrote:

> If I understand you correctly, you're saying that this issue is an instance of bug#44115 because we get a backtrace instead of a nice error. I agree that the backtrace is ugly, but in this case the error shouldn't happen at all because all the recursively imported packages exist.

Your point is that parsing the Cabal file of the package "versions"
fails.  Mine is, somehow, instead of an ugly backtrace (whatever the
reason), the error for "guix import hackage futhark -r" should be:

  Syntax error: unexpected token : common (at line 36, column 0)
  Syntax error: unexpected end of input
  guix import: error: échec du téléchargement du fichier cabal du
paquet « versions »

as it is for "guix import hackage versions".

> The reason why the backtrace occurs is that the cabal-file for one of the recursively imported dependencies (versions) cannot be parsed using the current version of guix/import/cabal.scm. You'll find that `guix import hackage -r futhark` works as expected with the submitted patch#48943.

Yeah.  I started to give a look for fixing.  Thanks to be faster. :-)

> Furthermore, I actually think that a backtrace _is_ desirable in this case, because it is an error in the script, and not in the users input or some third-party repository.

My opinion is getting a Backtrace is always a poor user experience.
Well, matter of taste. ;-)


> As you say, your example works, but you've forgotten the "versions" dependency. If you add that to your list it will not work.

Yeah, right.  I did too quickly but it does not change my point above. :-)

Thanks,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#48700; Package guix. (Thu, 10 Jun 2021 13:31:02 GMT) Full text and rfc822 format available.

Message #25 received at 48700 <at> debbugs.gnu.org (full text, mbox):

From: "Philip Munksgaard" <philip <at> munksgaard.me>
To: zimoun <zimon.toutoune <at> gmail.com>
Cc: 48700 <at> debbugs.gnu.org
Subject: Re: bug#48700: guix import fails with unexpected token
Date: Thu, 10 Jun 2021 15:29:32 +0200
On Thu, 10 Jun 2021, at 15:02, zimoun wrote:
> On Thu, 10 Jun 2021 at 14:22, Philip Munksgaard <philip <at> munksgaard.me> wrote:
> 
> > If I understand you correctly, you're saying that this issue is an instance of bug#44115 because we get a backtrace instead of a nice error. I agree that the backtrace is ugly, but in this case the error shouldn't happen at all because all the recursively imported packages exist.
> 
> Your point is that parsing the Cabal file of the package "versions"
> fails.  Mine is, somehow, instead of an ugly backtrace (whatever the
> reason), the error for "guix import hackage futhark -r" should be:
> 
>   Syntax error: unexpected token : common (at line 36, column 0)
>   Syntax error: unexpected end of input
>   guix import: error: échec du téléchargement du fichier cabal du
> paquet « versions »
> 
> as it is for "guix import hackage versions".
> 

Good point, I agree that would be nicer. The backtrace was not my concern when submitting this bug, but it doesn't really matter as long as both issues are fixed :-)




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 10 Aug 2021 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 253 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.