Closed joe-getcouragenow closed 3 years ago
also my env because this error might be due to a change in golang and modules, but not sure.
I have GO111MODULE="on" of course.
go version
go version go1.15 darwin/amd64
go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/Users/apple/workspace/go/bin"
GOCACHE="/Users/apple/Library/Caches/go-build"
GOENV="/Users/apple/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/apple/workspace/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build891913238=/tmp/go-build -gno-record-gcc-switches -fno-common"
Just doing the calls manually also fails. Not sure why its complaining about the github.com/vugu/vugu repo and "working directory is not part of a module", because it is.
go get -u github.com/vugu/vugu/cmd/vugugen
go: found github.com/vugu/vugu/cmd/vugugen in github.com/vugu/vugu v0.3.2
➜ tinygo-ex git:(master) ✗ go install github.com/vugu/vugu/cmd/vugugen
cannot find module providing package github.com/vugu/vugu/cmd/vugugen: working directory is not part of a module
Interesting. I believe this is because GO111MODULE is set to on
. If you set it to auto
things should work correctly.
From reading here though https://blog.golang.org/modules2019 it looks like the intention is for on
to be the new default at some point. So vgrun should probably be updated to work properly with the various GO111MODULE values.
Let me know if auto
fixes the problem, and then we can take a look at what an appropriate fix would be.
Yep you were right !
I changed GO111MODULE to "auto", and its all working.
vgrun -install-tools
2020/08/25 06:51:36 Installing vugugen
2020/08/25 06:51:47 Installing vgrgen
env:
go env
GO111MODULE="auto"
GOARCH="amd64"
GOBIN="/Users/apple/workspace/go/bin"
GOCACHE="/Users/apple/Library/Caches/go-build"
GOENV="/Users/apple/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/apple/workspace/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/apple/workspace/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/opt/go/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/opt/go/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/wp/ff6sz9qs6g71jnm12nj2kbyw0000gp/T/go-build241480537=/tmp/go-build -gno-record-gcc-switches -fno-common"
Okay great. I also just pushed a fix for this which should make it work regardless of GO111MODULE env setting. I'll close this now, let me know if you run into more issues.
The other bits still work though because i installed vugugen manually, but for others it wont work.