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/exp/cmd/gorelease: support for using VCS references as versions #37412

Closed
myitcv opened this issue Feb 24, 2020 · 2 comments
Closed

x/exp/cmd/gorelease: support for using VCS references as versions #37412

myitcv opened this issue Feb 24, 2020 · 2 comments
Labels
FeatureRequest FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@myitcv
Copy link
Member

myitcv commented Feb 24, 2020

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

$ go version
go version devel +151ccd4bdb Mon Feb 24 02:36:05 2020 +0000 linux/amd64
$ git rev-parse HEAD
7c80518d1cc79ffde9e571fe4fd281f321d36200

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="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOENV="/home/myitcv/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/myitcv/gos"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/myitcv/gostuff/src/github.com/myitcv/govim/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-build463360569=/tmp/go-build -gno-record-gcc-switches"

What did you do?

In the context of a CI script, reviewing the changes being proposed in a PR, for example:

$ gorelease -base=vcs:$(git merge-base HEAD origin/master)

I'm spitballing with the vcs: prefix above

What did you expect to see?

A comparison with the HEAD of the master branch. In this case I would expect the VCS reference to be resolved locally, rather than via the proxy.

What did you see instead?

No support for using VCS references as versions.

cc @jayconrod

@gopherbot gopherbot added this to the Unreleased milestone Feb 24, 2020
@jayconrod
Copy link
Contributor

gorelease should eventually be able to refer to any version that go mod download can accept. So it should take latest (#37410), master, HEAD and whatever else.

Using the local VCS would be valuable, but it's hard to get it right, depending on the scope.

My first prototype of gorelease did exactly this, but it added a lot of complication. It requires copying and modifying a lot of code that cmd/go uses for direct mode. I don't expect things like Git submodules or git smudge could be supported without specialized code and probably a lot of bugs.

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 27, 2020
@jayconrod jayconrod changed the title x/exp/gorelease: support for using VCS references as versions x/exp/cmd/gorelease: support for using VCS references as versions Feb 28, 2020
@gopherbot
Copy link

Change https://golang.org/cl/236598 mentions this issue: cmd/gorelease: accept version queries for -base

@golang golang locked and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants