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 get -u fails with local-only replacements #32567

Open
kenichi-fukushima opened this issue Jun 12, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@kenichi-fukushima
Copy link

commented Jun 12, 2019

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

@bcmills bcmills changed the title go get -u fails with replace with local modules in go.mod cmd/go: go get -u fails with local-only replacements Jun 13, 2019

@bcmills

This comment has been minimized.

Copy link
Member

commented Jun 13, 2019

Coincidentally, @jayconrod and I also noticed that this is broken in the context of https://golang.org/cl/180337.

Any fix is probably too invasive for 1.13, but we're planning to overhaul replacements in general for 1.14.

@bcmills bcmills added this to the Go1.14 milestone Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.