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

x/vgo: mirror or url rewrite request (feature) #29917

Closed
boxsnake opened this issue Jan 24, 2019 · 2 comments
Closed

x/vgo: mirror or url rewrite request (feature) #29917

boxsnake opened this issue Jan 24, 2019 · 2 comments
Milestone

Comments

@boxsnake
Copy link

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

$ go version
go version go1.11.4 windows/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
set GOARCH=amd64
set GOBIN=E:\Projects\freat/bin
set GOCACHE=C:\Users\Alex\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Alex\go
set GOPROXY=
set GORACE=
set GOROOT=D:\Programs\Go
set GOTMPDIR=
set GOTOOLDIR=D:\Programs\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Alex\AppData\Local\Temp\go-build844678762=/tmp/go-build -gno-record-gcc-switches

What did you do?

  • Install vgo via go get github.com/x/vgo
  • Run vgo get github.com/jinzhu/gorm
  • Since gorm depends on package cloud.google.com/go, and the repository does not exists now, it failes in getting gorm.
  • Here is cloud.google.com/go mirror on Github: https://github.com/googleapis/google-cloud-go
  • Here is the doc on godoc: https://godoc.org/cloud.google.com/go
  • The go uses package name to detect VCS url. Since the package name is still cloud.google.com/go, vgo can not found the VCS repo.

I hope that mirrors or url rewrite to be added into vgo for dealing with such troubling situations.

@gopherbot gopherbot added this to the vgo milestone Jan 24, 2019
@boxsnake boxsnake changed the title x/vgo: mirror or rul rewrite request (feature) x/vgo: mirror or url rewrite request (feature) Jan 24, 2019
@mvdan
Copy link
Member

mvdan commented Jan 24, 2019

I'm pretty sure you can just use replace directives for this purpose: https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive

@boxsnake
Copy link
Author

@mvdan Thanks. I did not notice that.

vgo is almost the first dependency managing tool which makes a go project "really" reproducible. Hope this can be widely used.

@golang golang locked and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants