Re: [go-nuts] GOPATH, GOBIN, go install, go build, cross-compiles

2023-01-20 Thread 'Sean Liao' via golang-nuts
> GOCACHE seems to default to ~/.cache/go-build on my machine. > Shouldn't GOMODCACHE do the same? That was decided against: https://go.dev/issue/34527#issuecomment-559185776 > ... It would be super interesting to > have in-repo or in-module metadata that could be used for these flags. General

Re: [go-nuts] GOPATH, GOBIN, go install, go build, cross-compiles

2023-01-20 Thread 'Tim Hockin' via golang-nuts
Thanks Sean. On Fri, Jan 20, 2023 at 10:39 AM 'Sean Liao' via golang-nuts wrote: > > in module mode, > GOPATH is really only used for deriving default locations for GOBIN and > GOMODCACHE > setting it to /dev/null might not be great for caching dependencies if > GOMODCACHE isn't set I think

Re: [go-nuts] GOPATH, GOBIN, go install, go build, cross-compiles

2023-01-20 Thread 'Sean Liao' via golang-nuts
in module mode, GOPATH is really only used for deriving default locations for GOBIN and GOMODCACHE setting it to /dev/null might not be great for caching dependencies if GOMODCACHE isn't set cross compile to GOBIN was recently (re)opened https://go.dev/issue/57485 There are open requests to

[go-nuts] GOPATH, GOBIN, go install, go build, cross-compiles

2023-01-20 Thread 'Tim Hockin' via golang-nuts
I'm trying to make kubernetes' codebase easier to navigate by people who have muscle-memory for go. In the past we said "you have to call our Makefile" to build things. I'd like to make \`go install\` work but I'm struggling to find a pattern that really works - am I missing something?