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: "go.mod" has non-.../v23 module path when "v23" is just a directory #33035

Closed
jayconrod opened this issue Jul 10, 2019 · 4 comments
Closed

Comments

@jayconrod
Copy link
Contributor

@jayconrod jayconrod commented Jul 10, 2019

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

  • go version devel +fbaf881cc62 Mon Jul 8 14:31:42 2019 +0000 darwin/amd64
  • go1.13beta
  • go1.12.7

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="/Users/jayconrod/Library/Caches/go-build"
GOENV="/Users/jayconrod/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/jayconrod/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/Users/jayconrod/Code/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/Users/jayconrod/Code/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/jayconrod/Code/test/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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rq/x0692kqj6ml8cvrhcqh5bswc008xj1/T/go-build600119194=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

In a directory outside GOPATH without go.mod (e.g., $HOME):

GOPROXY=direct go list v.io/v23/context

At the time of this writing, v.io points to github.com/vanadium/core. master is 31f2bd66a7da. The latest semver tag is v0.1.3.

Note that v.io is the module path, not v.io/v23. v23 is just a subdirectory, not a semantic import version suffix.

What did you expect to see?

This is what is printed if v.io is listed in module requirements or if GOPROXY=https://proxy.golang.org:

v.io/v23/context

What did you see instead?

go: finding v.io/v23/context latest
go: finding v.io/v23 latest
go: downloading v.io/v23 v23.0.0-20190603052200-31f2bd66a7da
can't load package: package v.io/v23/context: unknown import path "v.io/v23/context": cannot find module providing package v.io/v23/context
@jayconrod jayconrod added this to the Go1.14 milestone Jul 10, 2019
@jayconrod

This comment has been minimized.

Copy link
Contributor Author

@jayconrod jayconrod commented Jul 10, 2019

This seems to be a bug in modload.QueryPackage. In order to find what module provides this package, we try various prefixes of the package path:

  1. v.io/v23/context - no package found
  2. v.io/v23 - invalid module
  3. v.io - correct.

The error in (2) prevents us from proceeding with (3).

Not considering this to be a 1.13 release blocker since it's not a regression from 1.12.

@siddharthab

This comment has been minimized.

Copy link

@siddharthab siddharthab commented Jul 10, 2019

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 26, 2019

Does this still reproduce with gotip? It may have been fixed by CL 186237.

@jayconrod

This comment has been minimized.

Copy link
Contributor Author

@jayconrod jayconrod commented Jul 29, 2019

Verified this works at tip. Thanks for fixing!

@jayconrod jayconrod closed this Jul 29, 2019
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.