GNU bug report logs - #49228
guix import go fails when module does not have a documenation on pkg.go.dev

Previous Next

Package: guix;

Reported by: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

Date: Fri, 25 Jun 2021 22:32:01 UTC

Severity: normal

Done: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

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 49228 in the body.
You can then email your comments to 49228 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#49228; Package guix. (Fri, 25 Jun 2021 22:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 25 Jun 2021 22:32:02 GMT) Full text and rfc822 format available.

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

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: <bug-guix <at> gnu.org>
Subject: guix import go fails when module does not have a documenation on
 pkg.go.dev
Date: Sat, 26 Jun 2021 00:30:47 +0200
[Message part 1 (text/plain, inline)]
$ ./pre-inst-env guix import go github.com/caspr-io/yamlpath 
go-module->guix-package module-path: github.com/caspr-io/yamlpath
Backtrace:
In ice-9/boot-9.scm:
  1752:10  8 (with-exception-handler _ _ #:unwind? _ # _)
In unknown file:
           7 (apply-smob/0 #<thunk 7f370ddfc0c0>)
In ice-9/boot-9.scm:
    724:2  6 (call-with-prompt _ _ #<procedure default-prompt-handle?>)
In ice-9/eval.scm:
    619:8  5 (_ #(#(#<directory (guile-user) 7f370de02c80>)))
In guix/ui.scm:
  2147:12  4 (run-guix-command _ . _)
In guix/scripts/import.scm:
   120:11  3 (guix-import . _)
In guix/scripts/import/go.scm:
   118:27  2 (guix-import-go . _)
In ice-9/eval.scm:
   293:34  1 (_ #(#(#(#(#(#(#(#(#(#(#(?) ?) ?) ?) ?) ?) ?) ?) ?) ?) ?))
    619:8  0 (_ #(#(#<directory (guix import go) 7f370b75a6e0> #f)))

ice-9/eval.scm:619:8: Throw to key `match-error' with args `("match" "no matching pattern" #f)'.

If you look at the page

https://pkg.go.dev/github.com/caspr-io/yamlpath

It has no Description, because the site cannot parse license
information correctly and thus conservatively does not display any info.

Can be trivially fixed with this:

diff --git a/guix/import/go.scm b/guix/import/go.scm
index d110954664..10095b9d24 100644
--- a/guix/import/go.scm
+++ b/guix/import/go.scm
@@ -190,6 +194,7 @@ e.g. \"google.golang.org/protobuf/proto\"."
                             (first description))))
     (match description*
       (() #f)                           ;nothing selected
+      (#f #f)
 
Hope this is independent of the other go-importer-bugs we have, like:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49202
http://issues.guix.gnu.org/issue/45984

Additionally, it would be nice if the go-module->guix-package would
print out the module it would fetch next (like I did above). Then the
broken module would be easier to find in recursive mode.

Björn
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#49228; Package guix. (Sat, 26 Jun 2021 01:19:01 GMT) Full text and rfc822 format available.

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

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 49228 <at> debbugs.gnu.org
Subject: Re: bug#49228: guix import go fails when module does not have a
 documenation on pkg.go.dev
Date: Fri, 25 Jun 2021 18:18:04 -0700
Hello,

Thanks for the report.

Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> writes:

> $ ./pre-inst-env guix import go github.com/caspr-io/yamlpath 
> [...]
> ice-9/eval.scm:619:8: Throw to key `match-error' with args `("match" "no matching pattern" #f)'.
>
> If you look at the page
>
> https://pkg.go.dev/github.com/caspr-io/yamlpath
>
> It has no Description, because the site cannot parse license
> information correctly and thus conservatively does not display any info.

There is currently a patch for this (mine; though I could have named it
better, I suppose):

https://issues.guix.gnu.org/49200

> Additionally, it would be nice if the go-module->guix-package would
> print out the module it would fetch next (like I did above). Then the
> broken module would be easier to find in recursive mode.

Error reporting in the importers is currently pretty inconsistent and
could use a lot of improvement. You might be interested in taking a look
at the PATCH v3 in <https://issues.guix.gnu.org/49196> which somewhat
addresses this. Comments are always welcome! :)

Sarah




Reply sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
You have taken responsibility. (Mon, 28 Jun 2021 06:59:02 GMT) Full text and rfc822 format available.

Notification sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
bug acknowledged by developer. (Mon, 28 Jun 2021 06:59:02 GMT) Full text and rfc822 format available.

Message #13 received at 49228-done <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Sarah Morgensen <iskarian <at> mgsn.dev>
Cc: 49228-done <at> debbugs.gnu.org
Subject: Re: bug#49228: guix import go fails when module does not have a
 documenation on pkg.go.dev
Date: Mon, 28 Jun 2021 08:58:27 +0200
[Message part 1 (text/plain, inline)]
Hi Sarah,

On Fri, 25 Jun 2021 18:18:04 -0700
Sarah Morgensen <iskarian <at> mgsn.dev> wrote:

> There is currently a patch for this (mine; though I could have named
> it better, I suppose):
> 
> https://issues.guix.gnu.org/49200

Nice coincident :-)

I pushed your patch as

9d9152425e96c408357d0f4961767a5c08076c13

Thanks.
 
> > Additionally, it would be nice if the go-module->guix-package would
> > print out the module it would fetch next (like I did above). Then
> > the broken module would be easier to find in recursive mode.  
> 
> Error reporting in the importers is currently pretty inconsistent and
> could use a lot of improvement. You might be interested in taking a
> look at the PATCH v3 in <https://issues.guix.gnu.org/49196> which
> somewhat addresses this. Comments are always welcome! :)


Good to know. I will have a look at these patches the next days/weeks.

Björn
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#49228; Package guix. (Mon, 28 Jun 2021 16:25:02 GMT) Full text and rfc822 format available.

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

From: zimoun <zimon.toutoune <at> gmail.com>
To: 49228 <at> debbugs.gnu.org, 
 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 49228-done <at> debbugs.gnu.org, Sarah Morgensen <iskarian <at> mgsn.dev>
Subject: Re: bug#49228: guix import go fails when module does not have a
 documenation on pkg.go.dev
Date: Mon, 28 Jun 2021 18:24:16 +0200
Hi,

On Mon, 28 Jun 2021 at 08:59, Björn Höfling
<bjoern.hoefling <at> bjoernhoefling.de> wrote:

> I pushed your patch as
>
> 9d9152425e96c408357d0f4961767a5c08076c13

Here, there is a tiny typo. :-)

--8<---------------cut here---------------start------------->8---
 ;;; Copyright © 2021 Ludovic Courtès <ludo <at> gnu.org>
 ;;; Copyright © 2021 Xinglu Chen <public <at> yoctocell.xyz>
+;; Copyright © 2021 Sarah Morgensen <iskarian <at> mgsn.dev>
 ;;;
 ;;; This file is part of GNU Guix.
--8<---------------cut here---------------end--------------->8---

> > > Additionally, it would be nice if the go-module->guix-package would
> > > print out the module it would fetch next (like I did above). Then
> > > the broken module would be easier to find in recursive mode.
> >
> > Error reporting in the importers is currently pretty inconsistent and
> > could use a lot of improvement. You might be interested in taking a
> > look at the PATCH v3 in <https://issues.guix.gnu.org/49196> which
> > somewhat addresses this. Comments are always welcome! :)
>
> Good to know. I will have a look at these patches the next days/weeks.

If v4 is good enough to be merged, then feel free to push it. :-)

Cheers,
simon




Information forwarded to bug-guix <at> gnu.org:
bug#49228; Package guix. (Mon, 28 Jun 2021 16:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#49228; Package guix. (Wed, 30 Jun 2021 22:17:02 GMT) Full text and rfc822 format available.

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

From: raingloom <raingloom <at> riseup.net>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 49228 <at> debbugs.gnu.org
Subject: Re: bug#49228: guix import go fails when module does not have a
 documenation on pkg.go.dev
Date: Wed, 30 Jun 2021 23:20:05 +0200
On Sat, 26 Jun 2021 00:30:47 +0200
Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de> wrote:

> $ ./pre-inst-env guix import go github.com/caspr-io/yamlpath 
> go-module->guix-package module-path: github.com/caspr-io/yamlpath
> Backtrace:
> In ice-9/boot-9.scm:
>   1752:10  8 (with-exception-handler _ _ #:unwind? _ # _)
> In unknown file:
>            7 (apply-smob/0 #<thunk 7f370ddfc0c0>)
> In ice-9/boot-9.scm:
>     724:2  6 (call-with-prompt _ _ #<procedure
> default-prompt-handle?>) In ice-9/eval.scm:
>     619:8  5 (_ #(#(#<directory (guile-user) 7f370de02c80>)))
> In guix/ui.scm:
>   2147:12  4 (run-guix-command _ . _)
> In guix/scripts/import.scm:
>    120:11  3 (guix-import . _)
> In guix/scripts/import/go.scm:
>    118:27  2 (guix-import-go . _)
> In ice-9/eval.scm:
>    293:34  1 (_ #(#(#(#(#(#(#(#(#(#(#(?) ?) ?) ?) ?) ?) ?) ?) ?) ?)
> ?)) 619:8  0 (_ #(#(#<directory (guix import go) 7f370b75a6e0> #f)))
> 
> ice-9/eval.scm:619:8: Throw to key `match-error' with args `("match"
> "no matching pattern" #f)'.
> 
> If you look at the page
> 
> https://pkg.go.dev/github.com/caspr-io/yamlpath
> 
> It has no Description, because the site cannot parse license
> information correctly and thus conservatively does not display any
> info.

Could we use godocs.io? It's more copyleft friendly AFAIK.
But that's just hearsay, I'm only getting into Go now, so idk much
about the services surrouding it yet.




Information forwarded to bug-guix <at> gnu.org:
bug#49228; Package guix. (Thu, 01 Jul 2021 04:19:02 GMT) Full text and rfc822 format available.

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

From: Sarah Morgensen <iskarian <at> mgsn.dev>
To: raingloom <raingloom <at> riseup.net>
Cc: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>,
 49228 <at> debbugs.gnu.org
Subject: Re: bug#49228: guix import go fails when module does not have a
 documenation on pkg.go.dev
Date: Wed, 30 Jun 2021 21:18:09 -0700
Hi,

raingloom <raingloom <at> riseup.net> writes:

>> If you look at the page
>> 
>> https://pkg.go.dev/github.com/caspr-io/yamlpath
>> 
>> It has no Description, because the site cannot parse license
>> information correctly and thus conservatively does not display any
>> info.
>
> Could we use godocs.io? It's more copyleft friendly AFAIK.
> But that's just hearsay, I'm only getting into Go now, so idk much
> about the services surrouding it yet.

Right now the information from pkg.go.dev is used to populate the package's
  * synopsis
  * description, and
  * license
sections.

As far as I can tell, godocs.io does not have any information about the
package's license... *eventually* we may want to consider writing a
license guesser of our own, as that could potentially be useful across
all of Guix.

As for description, godocs.io seems to collects description information
differently (inferiorly?) than pkg.go.dev. For example, compare:

  https://godocs.io/github.com/mitchellh/go-homedir
  https://pkg.go.dev/github.com/mitchellh/go-homedir

I wonder how complicated it would be to guess at a synopsis/description
ourselves? It may be worth asking the initial committers of the go
importer.

--
Sarah




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

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

Previous Next


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