Please answer these questions before submitting your issue. Thanks!
go version)?$> go version
go version devel +c941e27e70 Fri Feb 16 19:28:41 2018 +0000 linux/amd64
yes.
go env)?$> go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/binet/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/binet/work/gonum"
GORACE=""
GOROOT="/home/binet/sdk/go"
GOTMPDIR=""
GOTOOLDIR="/home/binet/sdk/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build212473774=/tmp/go-build -gno-record-gcc-switches"
$> go get -u gonum.org/v1/gonum/stat
$> cd $GOPATH/gonum.org/v1/gonum/stat
$> touch go.mod
$> vgo build -v
vgo: resolving import "gonum.org/v1/gonum/floats"
vgo: finding gonum.org/v1/gonum (latest)
vgo: adding gonum.org/v1/gonum v0.0.0-20180205154402-996b88e8f894
gonum.org/v1/gonum/stat
$> vgo build -v
vgo: errors parsing go.mod:
/home/binet/work/gonum/src/gonum.org/v1/gonum/stat/go.mod:3: module path contains non-final version element v1
/cc @rsc
I guess this issue is loosely related to https://github.com/golang/go/issues/24119 (where an alternative syntax is being discussed.)
but I must say I am not completely sure I understand the underlying reason for this check in the current vgo source code.
is it because if we were to allow an import path with something that looks like a version then one would have to check for inconsistencies? (checking for inconsistencies looks rather easy from a 10,000 ft overview... :P)
hi there,
any news?
planning-wise, it would be interesting for Gonum to know where we are headed, or if we need to provide more informations, use cases or rationale to help the decision process.
I could even help and send a CL once I know what's cooking.
right now we are a bit in the dark :)
I was hit by this today trying to build https://github.com/decomp/decomp using vgo.
module github.com/decomp/decomp
require (
bitbucket.org/zombiezen/cardcpx v0.0.0-20150417151802-902f68ff43ef
github.com/graphism/exp v0.0.0-20180515191528-78b6f6b90bd7
github.com/graphism/simple v0.0.0-20180515061654-415a775f75dc
github.com/llir/llvm v0.0.0-20180307193049-784d18aa9fbe
github.com/mewkiz/pkg v0.0.0-20170428133157-c19a6f9fa6f8
github.com/pkg/errors v0.8.0
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de
gonum.org/v1/gonum v0.0.0-20180515151431-3f7b30d06c1c
)
[u@x220 decomp]$ vgo build ./...
vgo: errors parsing go.mod:
/tmp/go/src/github.com/decomp/decomp/go.mod:11: module path contains non-final version element v1
@rsc I'm pretty disappointed that this has gained no reply given the long time given and that the vgo proposal has been accepted. The absence of an answer leaves us in a difficult position of now knowing what we should do; do we step out and break all our clients or do we wait an hope that a decision is made that allows us to retain our current import paths is made.
Sorry about leaving you hanging. I intend to make sure you can keep your import paths.
Change https://golang.org/cl/114435 mentions this issue: cmd/go/internal/modfile: allow module path contains non-final version element
Thanks, Russ,
To confirm, with this change the go.mod posted in https://github.com/golang/go/issues/23960#issuecomment-389963875 works with vgo. Thanks Russ.
Most helpful comment
Sorry about leaving you hanging. I intend to make sure you can keep your import paths.