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 -u all is attempting to find a VCS repository for a module path that is replaced with a local directory #40326

Closed
microo8 opened this issue Jul 21, 2020 · 1 comment

Comments

@microo8
Copy link

@microo8 microo8 commented Jul 21, 2020

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

$ go version
go version go1.14.6 linux/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="/home/micro/.cache/go-build"
GOENV="/home/micro/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="mycompany.com"
GONOSUMDB="mycompany.com"
GOOS="linux"
GOPATH="/home/micro/Workspace"
GOPRIVATE="mycompany.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/micro/Workspace/src/mycompany.com/client/project/server/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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build109635984=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I have private modules replaced with local modules in my go.mod in the mycompany.com/...

module mycompany.com/clientname/server

go 1.14

require (
    github.com/lib/pq v1.7.0
    github.com/99designs/gqlgen v0.11.3
    github.com/vektah/gqlparser/v2 v2.0.1
    golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
    mycompany.com/clientname/models v0.0.0-00010101000000-000000000000
    mycompany.com/common/utils v0.0.0-00010101000000-000000000000
)

replace mycompany.com/common/utils => ../../common/utils

replace mycompany.com/clientname/models => ../models

The mycompany.com is just fictional, there isn't a server on the url and I run go get -u all

What did you expect to see?

Update the valid modules in go.mod and leave the local/replaced ones

What did you see instead?

go get -u all fails with go get all: unrecognized import path "mycompany.com/common/utils": reading https://mycompany.com/common/utils?go-get=1: 404 Not Found

It finds the new versions of the github.com modules, then fails and doesn't update go.mod

@bcmills
Copy link
Member

@bcmills bcmills commented Jul 21, 2020

Duplicate of #32567

@bcmills bcmills marked this as a duplicate of #32567 Jul 21, 2020
@bcmills bcmills closed this Jul 21, 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.