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

go get -v broken after upgrade go1.13.0 #34058

Closed
detailyang opened this issue Sep 4, 2019 · 4 comments
Closed

go get -v broken after upgrade go1.13.0 #34058

detailyang opened this issue Sep 4, 2019 · 4 comments
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.

Comments

@detailyang
Copy link

detailyang commented Sep 4, 2019

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?

╭─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
@detailyang
Copy link
Author

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

            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 ...

@bcmills
Copy link
Contributor

bcmills commented Sep 4, 2019

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).

@bcmills bcmills added modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Sep 4, 2019
@cloudlena
Copy link

go get -v all should also work.

@detailyang
Copy link
Author

consider it's resolved

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

4 participants