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

proposal: dl/gotip: allow building branches #39650

Open
vearutop opened this issue Jun 17, 2020 · 5 comments
Open

proposal: dl/gotip: allow building branches #39650

vearutop opened this issue Jun 17, 2020 · 5 comments
Labels
Milestone

Comments

@vearutop
Copy link
Contributor

@vearutop vearutop commented Jun 17, 2020

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

$ go version
go version go1.14.2 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/vearutop/.cache/go-build"
GOENV="/home/vearutop/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="github.com/hellofresh"
GONOSUMDB="github.com/hellofresh"
GOOS="linux"
GOPATH="/home/vearutop/go"
GOPRIVATE="github.com/hellofresh"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/vearutop/sdk/go1.14.2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/vearutop/sdk/go1.14.2/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/vearutop/sdk/go/src/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-build956599529=/tmp/go-build -gno-record-gcc-switches"

What did you do?

I wanted to install generics prototype tool go2go locally to play with it. I thought I could use dl/gotip for that.

gotip download dev.go2go

What did you expect to see?

I expect to see dev.go2go built and available through gotip.

What did you see instead?

I see that dev.go2go is not a valid CL number.

Being able to build prototype branches with gotip can simplify the process of prototypes review.
I've tried to implement this in forked gotip.

Hopefully it would make sense to add such feature in dl/gotip.

@gopherbot gopherbot added this to the Proposal milestone Jun 17, 2020
@gopherbot gopherbot added the Proposal label Jun 17, 2020
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 17, 2020

As a workaround, you can pick a recent commit from the dev.go2go branch and use its CL number.

What do you propose should happen if gotip download notexist is executed, where notexist is a branch that does not exist?

What should happen if gotip download go1.15beta1 is executed, where go1.15beta1 is a tag (not a branch) that exists?

/cc @FiloSottile

@vearutop
Copy link
Contributor Author

@vearutop vearutop commented Jun 18, 2020

Same behavior that exists for CLs can be applied (as in linked example implemetation).

gotip download go1.15beta1

This will download and execute code from branch go1.15beta1, continue? [y/n] y
gotip: branch go1.15beta1 not found
gotip download notexist

This will download and execute code from branch notexist, continue? [y/n] y
gotip: branch notexist not found
@broady
Copy link
Member

@broady broady commented Jun 27, 2020

I hadn't seen this proposal until @mdlayher pointed me to it.

I implemented it over at https://golang.org/cl/240002.

@mdlayher
Copy link
Member

@mdlayher mdlayher commented Jun 27, 2020

Thanks for following up! I wonder why gopherbot hasn't pinged this issue yet.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Jun 29, 2020

I wonder why gopherbot hasn't pinged this issue yet.

It should be because the CL didn't use a fully qualified issue reference (i.e., it was missing the "golang/go" prefix). /cc @FiloSottile

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
5 participants
You can’t perform that action at this time.