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 in a module containing local only replace #39729

Open
rajveermalviya opened this issue Jun 20, 2020 · 0 comments
Open

cmd/go: go get -u fails in a module containing local only replace #39729

rajveermalviya opened this issue Jun 20, 2020 · 0 comments
Labels
Milestone

Comments

@rajveermalviya
Copy link

@rajveermalviya rajveermalviya commented Jun 20, 2020

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

$ go version
go version go1.14.4 linux/amd64

Does this issue reproduce with the latest release?

Yep

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/var/home/rajveer/.cache/go-build"
GOENV="/var/home/rajveer/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/var/home/rajveer/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org"
GOROOT="/var/home/rajveer/.local/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/var/home/rajveer/.local/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build081973779=/tmp/go-build -gno-record-gcc-switches"

What did you do?

go.mod
module mycompany.com/A

go 1.14

require (
google.golang.org/api v0.26.
mycompany.com/B v0.0.0-00010101000000-000000000000
)

replace mycompany.com/B => ../B


go get -u -v
Tried to update all dependencies containing a local only replace, i.e the specified module domain doesn't exists. Here mycompany.com domain is just hypothetical.

What did you expect to see?

Probably ignore the local replaced dep when running go get -u

What did you see instead?

go get: upgrading mycompany.com/B@v0.0.0-00010101000000-000000000000: module mycompany.com/B: reading https://proxy.golang.org/mycompany.com/B/@v/list: 410 Gone
        server response: not found: mycompany.com/B@latest: unrecognized import path "mycompany.com/B": https fetch: Get "https://mycompany.com/B?go-get=1": dial tcp: lookup mycompany.com/B on 8.8.8.8:53: no such host
@rajveermalviya rajveermalviya changed the title cmd/go: go get -u fails when updating all dependencies of a module containing local replace cmd/go: go get -u fails in a module containing local only replace Jun 21, 2020
@jayconrod jayconrod added this to the Go1.16 milestone Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.