go version)?$ go version go version go1.14.2 linux/amd64
Yes.
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"
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
I expect to see dev.go2go built and available through gotip.
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.
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
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
I hadn't seen this proposal until @mdlayher pointed me to it.
I implemented it over at https://golang.org/cl/240002.
Thanks for following up! I wonder why gopherbot hasn't pinged this issue yet.
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
Taking this issue out of the proposal process.
We'd have found this a useful option today, to pin gotip to a known-good master commit that has all the fixes that make cross compiling for darwin/arm64 work.
@yob I don't see how it could be used for that. What branch name would you use?
oh. I only skimmed the CL, but I assumed (incorrectly?) that ref could optionally be a known-good sha from master.
I see. This issue talks about branches only, but CL 240002 does seem to allow any git ref, not just branches.
Please note that it's still possible to pin a known-good master commit without this issue being resolved by using its CL number.
Most helpful comment
I hadn't seen this proposal until @mdlayher pointed me to it.
I implemented it over at https://golang.org/cl/240002.