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

dl/gotip: allow building branches #39650

Closed
vearutop opened this issue Jun 17, 2020 · 11 comments
Closed

dl/gotip: allow building branches #39650

vearutop opened this issue Jun 17, 2020 · 11 comments
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@vearutop
Copy link
Contributor

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
@dmitshur
Copy link
Contributor

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

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

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

@dmitshur
Copy link
Contributor

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

@ianlancetaylor
Copy link
Contributor

Taking this issue out of the proposal process.

@ianlancetaylor ianlancetaylor changed the title proposal: dl/gotip: allow building branches dl/gotip: allow building branches Nov 11, 2020
@ianlancetaylor ianlancetaylor added FeatureRequest NeedsFix The path to resolution is known, but the work has not been done. and removed Proposal labels Nov 11, 2020
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Unreleased Nov 11, 2020
yob added a commit to buildkite/agent that referenced this issue Dec 2, 2020
…the fixes we need

We're nervous about always building the darwin-arm64 binary with golang
master. Compiling with a potentially different golang version each time
is a recipe for non-deterministic output and hard to debug regressions.

Ideally we'd like to pin to a specific golang master commit, but I can't
see a way to do that with gotip (see this open issue [1]). I think
pinning to this CL will get a version that has apple the fixes we're
after though.

[1] golang/go#39650
@yob
Copy link

yob commented Dec 2, 2020

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.

@dmitshur
Copy link
Contributor

dmitshur commented Dec 2, 2020

@yob I don't see how it could be used for that. What branch name would you use?

@yob
Copy link

yob commented Dec 2, 2020

oh. I only skimmed the CL, but I assumed (incorrectly?) that ref could optionally be a known-good sha from master.

@dmitshur
Copy link
Contributor

dmitshur commented Dec 2, 2020

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.

@gopherbot
Copy link

Change https://golang.org/cl/301910 mentions this issue: gotip: add support for downloading branches

@golang golang locked and limited conversation to collaborators Mar 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FeatureRequest FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

7 participants