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

cmd/go: module get with wildcard fails #29687

Closed
myitcv opened this issue Jan 11, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@myitcv
Copy link
Member

commented Jan 11, 2019

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

$ go version
go version go1.12beta2 linux/amd64

Does this issue reproduce with the latest release?

Yes; testing with the beta pre Go 1.12 release.

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPROXY=""
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build697152744=/tmp/go-build -gno-record-gcc-switches"

What did you do?

The following testscript script reproduces the issue:

# no wildcard
env GOPATH=$WORK/gopath1
cp go.mod.orig go.mod
go get fruit.com/fruit

# wildcard
env GOPATH=$WORK/gopath2
cp go.mod.orig go.mod
go get fruit.com/...

-- go.mod.orig --
module mod

-- .gomodproxy/fruit.com_v1.0.0/.mod --
module fruit.com

-- .gomodproxy/fruit.com_v1.0.0/.info --
{"Version":"v1.0.0","Time":"2018-10-22T18:45:39Z"}

-- .gomodproxy/fruit.com_v1.0.0/go.mod --
module fruit.com

-- .gomodproxy/fruit.com_v1.0.0/fruit/fruit.go --
package main

func main() {}

What did you expect to see?

Given the docs:

$ go help module-get
...
Note that package patterns are allowed and are expanded after resolving
the module versions. For example, 'go get golang.org/x/perf/cmd/...'
adds the latest golang.org/x/perf and then installs the commands in that
latest version.
...

...I expected a good run.

What did you see instead?

# no wildcard (0.201s)
# wildcard (0.052s)
> env GOPATH=$WORK/gopath2
> cp go.mod.orig go.mod
> go get fruit.com/...
[stderr]
go: finding fruit.com v1.0.0
go: downloading fruit.com v1.0.0
go: extracting fruit.com v1.0.0
go get fruit.com/...: malformed module path "fruit.com/...": double dot

[exit status 1]
FAIL: /tmp/testscript008998565/0/script.txt:9: unexpected go command failure
error running go_wildcard_module_get.txt in /tmp/testscript008998565/0

cc @bcmills @jayconrod

Marking as 1.12 for now because I think this will need to be fixed pre release, but will leave @bcmills to decide.

@myitcv myitcv added this to the Go1.12 milestone Jan 11, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Jan 11, 2019

Dup of #29363, I think.

@bcmills bcmills closed this Jan 11, 2019

@myitcv

This comment has been minimized.

Copy link
Member Author

commented Jan 11, 2019

Apologies for the noise; I admit, I didn't look first.

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