Skip to content

cmd/go: go get -u fails with local-only replacements #32567

@kenichi-fukushima

Description

@kenichi-fukushima

Please answer these questions before submitting your issue. Thanks!

What did you do?

Run go get -u in a module with replace with a local module.

You can reproduce the problem by checking out this repository and run the command in depending directory.
https://github.com/kenichi-fukushima/go-local-modules

What did you expect to see?

The command finishes successfully.

What did you see instead?

The command failed with this message.

go get: upgrading example.com/depended@v0.0.0: unrecognized import path "example.com/depended" (parse https://example.com/depended?go-get=1: no go-import meta tags ())

System details

I got this error with 12.2/12.5 on Linux too.

go version go1.12.6 darwin/amd64
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/keni/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/keni/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/keni/Downloads/go-local-modules-master/depending/go.mod"
GOROOT/bin/go version: go version go1.12.6 darwin/amd64
GOROOT/bin/go tool compile -V: compile version go1.12.6
uname -v: Darwin Kernel Version 18.2.0: Thu Dec 20 20:46:53 PST 2018; root:xnu-4903.241.1~1/RELEASE_X86_64
ProductName:	Mac OS X
ProductVersion:	10.14.3
BuildVersion:	18D109
lldb --version: lldb-1000.0.38.2
  Swift-4.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.modules

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions