qri-io / qri_install

easy qri building & installation
1 stars 0 forks source link

bug: go_build qri doesn't work with new go modules #9

Open ramfox opened 5 years ago

ramfox commented 5 years ago

I assumed that all we would need to do to get the qri build working with go modules would be to adjust the environment variables, ie GO111MODULE=on and remove GOPATH.

Unfortunately, it keeps erroring:

$ qri_build qri --qri ~/go/src/github.com/qri-io/qri
INFO[0000] $ go build -o qri_darwin_amd64/qri /Users/ramfox/go/src/github.com/qri-io/qri
missing $GOPATH
ERRO[0000] building qri: exit status 1
ERRO[0000] exit status 1

Since we are using a go command (go build), there is some conflict happening in our environment variables. Even when we set the env variables (as we do with the other commands ie yarn build), the go build command pulls its env variables from the local terminal env, not from the env variables we feed it. This means that GO111MODULE=on never gets passed, so the command errors with missing GOPATH

Having trouble figuring out where the exact fix might be.

@dustmop tagging you cause this most definitely effects what you are currently working on