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

Closed
rajveermalviya opened this issue Jun 20, 2020 · 3 comments
Closed
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rajveermalviya
Copy link

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.0
	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 modules NeedsFix The path to resolution is known, but the work has not been done. labels Jun 23, 2020
@jayconrod jayconrod added this to the Go1.16 milestone Jun 23, 2020
@bcmills
Copy link
Contributor

bcmills commented Nov 9, 2020

This is likely fixed by CL 258220 and CL 266018.

@rajveermalviya, could you try a go command built from head (either build from source or use golang.org/dl/gotip), and let us know whether this is still an issue?

@bcmills bcmills self-assigned this Nov 9, 2020
@bcmills bcmills added the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 9, 2020
@rajveermalviya
Copy link
Author

yep can confirm it's fixed, tested with gotip

rajveer@toolbox ~/P/G/t/A [1]> gotip version
go version devel +feccfb8 Mon Nov 9 14:41:38 2020 +0000 linux/amd64

rajveer@toolbox ~/P/G/t/A> gotip get -u -v
go: downloading google.golang.org/api v0.35.0
go: downloading honnef.co/go/tools v0.0.1-2020.1.6
go: downloading golang.org/x/tools v0.0.0-20201105220310-78b158585360
go: downloading golang.org/x/mod v0.3.0
go: downloading golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
google.golang.org/api
mycompany.com/B

@bcmills bcmills removed the WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. label Nov 9, 2020
@bcmills
Copy link
Contributor

bcmills commented Nov 9, 2020

Great, thanks for confirming!

@bcmills bcmills closed this as completed Nov 9, 2020
@golang golang locked and limited conversation to collaborators Nov 9, 2021
@rsc rsc unassigned bcmills Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants