go: x/exp/cmd/gorelease: module source tree too large
What version of Go are you using (go version)?
$ go version go version go1.14.6 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env GO111MODULE="on" GOARCH="amd64" GOBIN="" GOCACHE="/home/user/.cache/go-build" GOENV="/home/user/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/user/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/user/.local/share/umake/go/go-lang" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/user/.local/share/umake/go/go-lang/pkg/tool/linux_amd64" GCCGO="gccgo" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/user/path/to/module/go.mod" 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-build965764173=/tmp/go-build -gno-record-gcc-switches"
What did you do?
gorelease
What did you expect to see?
Suggested version: v1.2.3
What did you see instead?
gorelease: create zip /home/user/path/to/module: module source tree too large (max size is 524288000 bytes)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (9 by maintainers)
Module zip files describes this restriction and others. I can’t claim it’s authoritative yet (still in draft state), but it will be in the future when it’s complete.
Is the source tree actually that large? Or can this be reproduced with a smaller tree? If so, how?
The
gocommand limits modules to 500 MiB. It’s important thatgoreleasereports that error to warn developers against tagging a release that others won’t be able to download.https://github.com/golang/mod/blob/89ce4c7ba8043b0e8a8c03f1a266fb0e56637314/zip/zip.go#L28-L30 This is the limit used by the go command.