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

Comments

@boxsnake
Copy link

commented Jan 24, 2019

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Author

commented Jan 24, 2019

@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.

@boxsnake boxsnake closed this Jan 24, 2019

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