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

test: fixedbugs/issue15609.go and fixedbugs/issue29612.go failing on master #33912

Open
mvdan opened this issue Aug 28, 2019 · 11 comments

Comments

@mvdan
Copy link
Member

commented Aug 28, 2019

$ go version
go version devel +372b0eed17 Wed Aug 28 12:57:59 2019 +0000 linux/amd64
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/mvdan/go/bin"
GOCACHE="/home/mvdan/go/cache"
GOENV="/home/mvdan/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY="brank.as/*"
GONOSUMDB="brank.as/*"
GOOS="linux"
GOPATH="/home/mvdan/go"
GOPRIVATE="brank.as/*"
GOPROXY="https://proxy.golang.org"
GOROOT="/home/mvdan/tip"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build921353500=/tmp/go-build -gno-record-gcc-switches"
$ cd test
$ go run run.go
# go run run.go -- fixedbugs/issue15609.go
exit status 1
go: cannot find main module; see 'go help modules'

FAIL    fixedbugs/issue15609.go 0.043s
# go run run.go -- fixedbugs/issue29612.go
exit status 1
go: cannot find main module; see 'go help modules'

FAIL    fixedbugs/issue29612.go 0.031s

/cc @bcmills @jayconrod

@mvdan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

The longtest builder seems happy with them, so this is probably something about my environment. Perhaps my setting of GO111MODULE=on or another one of the env vars.

@mvdan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

Yup, that guess was right. I can send a fix.

@mvdan mvdan self-assigned this Aug 28, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

Thanks. Could've sworn that I fixed fixedbugs in #30228, but perhaps I missed the go run mode of operation, or perhaps it has regressed since the switch back to auto.

@mvdan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

Or perhaps it involves other pieces of my env. I'll investigate a bit more.

@bcmills

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

It may be that I only fixed it when run via cmd/dist and not with go run directly.

@bcmills

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

Ah, perhaps it regressed at the same time as #33890?

@bcmills bcmills added this to the Go1.14 milestone Aug 28, 2019

@mvdan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

Hmm, these dirs have no go.mod, and the error is different, so I don't think it's the same issue. But it could be related.

@bcmills

This comment has been minimized.

Copy link
Member

commented Aug 28, 2019

Ah, if the test is running a go command inside a directory, we may need to follow the model of CL 165498 and add a go.mod file in that directory.

@mvdan mvdan removed their assignment Aug 28, 2019

@bcmills bcmills self-assigned this Aug 28, 2019

@cuonglm

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

@mvdan I have the same issue with go test cmd/vet, it's failed if GO111MODULE=on. I always to run:

env -u GO111MODULE go tool dist test
@mvdan

This comment has been minimized.

Copy link
Member Author

commented Aug 28, 2019

Hmm, go test cmd succeeded for me just a short while ago. If you still encounter issues, please file a bug.

@cuonglm

This comment has been minimized.

Copy link
Contributor

commented Aug 28, 2019

@mvdan I did, see #32107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.