-
Notifications
You must be signed in to change notification settings - Fork 86
Check GOPATH from 'go env GOPATH' when running 'make' #1735
base: master
Are you sure you want to change the base?
Conversation
When running 'make', the GOPATH environment variable is used to determine if the project is in the correct location. This patch changes this step to also try to determine GOPATH from 'go env GOPATH'.
Can one of the admins verify this patch? |
1 similar comment
Can one of the admins verify this patch? |
[test] |
Looks like there are still few more errors:
|
@jiekang snapshot fabric8-wit image is available for testing. |
[test] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The 'go' tools will assume GOPATH is $HOME/go if not set. This feature is in go 1.8+, not 1.7+. For more info see: golang/go#17262 Applications and libraries do not necessarily make the same assumption, or use 'go env' to determine the GOPATH. In this case, goagen uses os.getEnv("GOPATH") extensively to determine the GOPATH. It's not sane to try to set the GOPATH environment variable for a parent process, and I don't think it's a good idea to patch the f8-wit build to set GOPATH to the value of 'go env GOPATH' prior to running goagen or anything else, 1.8 support notwithstanding. The latest commit in this PR does set GOPATH prior to running goagen, mainly to show what needs to be done. I don't like the solution. For what it's worth, fabric8-wit does not build without go 1.8+ as one of it's dependencies uses features only available in 1.8+. See: #1736 |
@jiekang snapshot fabric8-wit image is available for testing. |
When running 'make', the GOPATH environment variable is used to determine if the project is in the correct location. This patch changes this step to also try to determine GOPATH from 'go env GOPATH'.
Addresses #1728