all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / Atom feed
* bug#50605: go: Commit d36c73b8a8f breaks `go tool`
@ 2021-09-15 17:29 Katherine Cox-Buday
  2021-09-16 14:36 ` Katherine Cox-Buday
  0 siblings, 1 reply; 2+ messages in thread
From: Katherine Cox-Buday @ 2021-09-15 17:29 UTC (permalink / raw)
  To: 50605; +Cc: Sarah Morgensen

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#50605: go: Commit d36c73b8a8f breaks `go tool`
  2021-09-15 17:29 bug#50605: go: Commit d36c73b8a8f breaks `go tool` Katherine Cox-Buday
@ 2021-09-16 14:36 ` Katherine Cox-Buday
  0 siblings, 0 replies; 2+ messages in thread
From: Katherine Cox-Buday @ 2021-09-16 14:36 UTC (permalink / raw)
  To: 50605-close; +Cc: Sarah Morgensen

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-16 14:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 17:29 bug#50605: go: Commit d36c73b8a8f breaks `go tool` Katherine Cox-Buday
2021-09-16 14:36 ` Katherine Cox-Buday

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.