go get -v broken after upgrade go1.13.0

Created on 4 Sep 2019  Â·  4Comments  Â·  Source: golang/go

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

$ go version
go version go1.13 darwin/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=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/detailyang/Library/Caches/go-build"
GOENV="/Users/detailyang/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/detailyang/go"
GOPRIVATE=""
GOPROXY="https://goproxy.io"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/detailyang/go/src/gitlab.alipay-inc.com/sofagw/sofagw/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/n3/g3fv953s435gqv0x7557ftyc0000gp/T/go-build116698842=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?


try resolves and adds dependencies by go get -v

What did you expect to see?

success

What did you see instead?

bash ╭─detailyang at detailyangdeMacBook-Pro in /Users/detailyang/go/src/github.com/detailyang/xxx (master↑1 ✔) ╰─λ go get -v -u go get .: path /Users/detailyang/go/src/github.com/detailyang/xxx is not a package in module rooted at /Users/detailyang/go/src/github.com/detailyang/xxx

FrozenDueToAge WaitingForInfo modules

Most helpful comment

go get -v all should also work.

All 4 comments

Well, after investigation and the codebase is cmd/go/internal/modget/get.go:346 as the following:

````golang
if !strings.Contains(path, "...") {
pkgPath := modload.DirImportPath(filepath.FromSlash(path))
if pkgs := modload.TargetPackages(pkgPath); len(pkgs) == 0 {
abs, err := filepath.Abs(path)
if err != nil {
abs = path
}
base.Errorf("go get %s: path %s is not a package in module rooted at %s", arg, abs, modload.ModRoot())
continue
}
}

        if path != arg {
            base.Errorf("go get %s: can't request explicit version of path in main module", arg)
            continue
        }

````

now it works by go get -v ...

Please fill out the complete issue template:

  • List the actual commands that you ran (with any sensitive paths anonymized).
  • Show the actual output as text (again with any sensitive paths anonymized).

go get -v all should also work.

consider it's resolved

Was this page helpful?
0 / 5 - 0 ratings