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

x/vgo: vgo build failed with kagome because of large zip #25424

Closed
deltam opened this issue May 16, 2018 · 2 comments

Comments

@deltam
Copy link

commented May 16, 2018

What version of Go are you using (go version)?

go version go1.10.2 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN="/Users/deltam/.gopath/1.10/bin"
GOCACHE="/Users/deltam/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/deltam/.gopath/1.10"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10.2/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10.2/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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/kh/zwzp4gp91l59p9c_jrkjcpbh0000gq/T/go-build768048968=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ go get -u golang.org/x/vgo
$ vgo version
go version go1.10.2 darwin/amd64 vgo:2018-02-20.1
$ mkdir test_vgo
$ cd test_vgo
$ echo >go.mod
$ wget https://gist.githubusercontent.com/deltam/14e44c5adff91e723d2036f5f8e7ac25/raw/8048a89bb73c3bf719f5d830917ee3673b52170e/main.go
$ vgo build
vgo: resolving import "github.com/ikawaha/kagome/tokenizer"
vgo: finding github.com/ikawaha/kagome (latest)
vgo: adding github.com/ikawaha/kagome v1.7.1
vgo: downloading github.com/ikawaha/kagome v1.7.1
vgo: import "github.com/deltam/kagome_user" ->
        import "github.com/ikawaha/kagome/tokenizer": downloaded zip file too large

main.go is in this gist.

What did you expect to see?

vgo build is success.

What did you see instead?

vgo build failed because of kagome's souce code zip is too large.

https://github.com/ikawaha/kagome/releases/tag/v1.7.1

$ wget https://github.com/ikawaha/kagome/archive/v1.7.1.zip
$ ls -l v1.7.1.zip
-rw-r--r--@ 1 deltam  staff  133686181 May 16 22:00 v1.7.1.zip

https://godoc.org/golang.org/x/vgo/vendor/cmd/go/internal/modfetch/codehost#pkg-constants

const (
    MaxGoMod   = 16 << 20  // maximum size of go.mod file
    MaxLICENSE = 16 << 20  // maximum size of LICENSE file
    MaxZipFile = 100 << 20 // maximum size of downloaded zip file
)

Kagome's description: Self-contained Japanese Morphological Analyzer written in pure Go

For user's convenience, there are modules with large files.

Why hardcode maximum size of downloaded zip file ?

@deltam

This comment has been minimized.

Copy link
Author

commented May 29, 2018

I found a simpler reproducing procedure.

$ go get -u golang.org/x/vgo
$ vgo version
go version go1.10.2 darwin/amd64 vgo:2018-02-20.1
$ mkdir test_vgo
$ cd test_vgo
$ echo "package m" > m.go
$ echo "module m" > go.mod
$ vgo get github.com/ikawaha/kagome
vgo: downloading github.com/ikawaha/kagome v1.7.1
vgo: import "github.com/ikawaha/kagome": downloaded zip file too large
@oiooj

This comment has been minimized.

Copy link
Member

commented Jun 6, 2018

Fixed by rsc.

@oiooj oiooj closed this Jun 6, 2018

@golang golang locked and limited conversation to collaborators Jun 6, 2019

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