Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go generate doesn't obey $GOPATH that go uses #15095

Closed
purpleidea opened this issue Apr 4, 2016 · 3 comments
Closed

cmd/go: go generate doesn't obey $GOPATH that go uses #15095

purpleidea opened this issue Apr 4, 2016 · 3 comments
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@purpleidea
Copy link

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
go version go1.5.3 linux/amd64

but present in latest golang too i think.

  1. What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/james/code/gopath/"
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT=""
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    I ran:
export GOPATH=something
GOPATH=whatever go generate
  1. What did you expect to see?
  2. What did you see instead?

I expected go generate to use the $GOPATH whatever, instead it uses something

This is obviously a huge issue because if you want to override the GOPATH in a script, this causes completely unexpected results!

@purpleidea
Copy link
Author

Alternatively, it could be that go generate, isn't falling back to the second term in the $GOPATH search term when more than one is specified...

@bradfitz bradfitz added this to the Unplanned milestone Apr 7, 2016
@robpike
Copy link
Contributor

robpike commented Apr 7, 2016

Please give a full reproducible example. The issue text is not clear.

@ALTree ALTree changed the title go generate doesn't obey $GOPATH that go uses cmd/go: go generate doesn't obey $GOPATH that go uses Jul 18, 2017
@ALTree ALTree added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Jul 18, 2017
@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@golang golang locked and limited conversation to collaborators Aug 18, 2018
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants