GNU bug report logs - #50605
go: Commit d36c73b8a8f breaks `go tool`

Previous Next

Package: guix;

Reported by: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>

Date: Wed, 15 Sep 2021 17:31:02 UTC

Severity: normal

Done: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>

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 50605 in the body.
You can then email your comments to 50605 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#50605; Package guix. (Wed, 15 Sep 2021 17:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Katherine Cox-Buday <cox.katherine.e <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Wed, 15 Sep 2021 17:31:02 GMT) Full text and rfc822 format available.

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

From: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
To: bug-guix <at> gnu.org
Cc: Sarah Morgensen <iskarian <at> mgsn.dev>, Leo Famulari <leo <at> famulari.name>
Subject: go: Commit d36c73b8a8f breaks `go tool`
Date: Wed, 15 Sep 2021 12:29:53 -0500
Aside from not being able to issue ~go tool~ commands, things like
~gopls~[1] are broken as well.

By design, ~GOTOOLDIR~ cannot be set from the user's environment[2].
This commit moved the directory, but did not update the ~GOTOOLDIR~
path.

#+begin_example
  $ env |grep GOTOOLDIR

  $ go env GOTOOLDIR
  /home/katco/.guix-profile/pkg/tool/linux_amd64

  $ export GOTOOLDIR=/tmp

  $ env |grep GOTOOLDIR
  GOTOOLDIR=/tmp

  $ go env GOTOOLDIR
  /home/katco/.guix-profile/pkg/tool/linux_amd64

  $ go env -w GOTOOLDIR=/tmp
  go env -w: GOTOOLDIR cannot be modified

  $ [ -e $(go env GOTOOLDIR) ] || echo Nope, not here.
  Nope, not here.

  $ [ -e /home/katco/.guix-profile/lib/go/pkg/tool ] && echo Here it is
  Here it is
#+end_example

I think these are the lines to blame:

#+begin_example
  d36c73b8a8f (Sarah Morgensen                 2021-09-02  763)                (for-each
  d36c73b8a8f (Sarah Morgensen                 2021-09-02  764)                 (lambda (file)
  d36c73b8a8f (Sarah Morgensen                 2021-09-02  765)                   (copy-recursively file (string-append out "/lib/go/" file)))
  d36c73b8a8f (Sarah Morgensen                 2021-09-02  766)                 '("lib" "VERSION" "pkg/include" "pkg/tool"))
#+end_example

[1] - https://pkg.go.dev/golang.org/x/tools/gopls
[2] - https://github.com/golang/go/issues/10264#issuecomment-91394026

--
Katherine




Reply sent to Katherine Cox-Buday <cox.katherine.e <at> gmail.com>:
You have taken responsibility. (Thu, 16 Sep 2021 14:37:02 GMT) Full text and rfc822 format available.

Notification sent to Katherine Cox-Buday <cox.katherine.e <at> gmail.com>:
bug acknowledged by developer. (Thu, 16 Sep 2021 14:37:02 GMT) Full text and rfc822 format available.

Message #10 received at 50605-close <at> debbugs.gnu.org (full text, mbox):

From: Katherine Cox-Buday <cox.katherine.e <at> gmail.com>
To: 50605-close <at> debbugs.gnu.org
Cc: Sarah Morgensen <iskarian <at> mgsn.dev>, Leo Famulari <leo <at> famulari.name>
Subject: go: Commit d36c73b8a8f breaks `go tool`
Date: Thu, 16 Sep 2021 09:36:36 -0500
I talked with Sarah in IRC (thanks for the quick response, Sarah!), and
we discovered it was because I had set =GOROOT= to
="${GUIX_PROFILE}/share/go". Go will set =${GOTOOLS}= relative to this
path.

Since Guix sets both of these to sensible defaults, I was able to remove
the customization and things went back to working as normal.

Sorry for the noise, and I hope this helps some future person!

-- 
Katherine




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

This bug report was last modified 3 years and 248 days ago.

Previous Next


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