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/playground: "// GOEXPERIMENT=xxx“ line often causes "timeout running go build” #61985

Open
go101 opened this issue Aug 13, 2023 · 7 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance
Milestone

Comments

@go101
Copy link

go101 commented Aug 13, 2023

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

$ go version
1.21

Does this issue reproduce with the latest release?

Yes

What did you do?

https://go.dev/play/p/VwcNVnozJlu

What did you expect to see?


Program exited.

What did you see instead?

timeout running go build

Go build failed.
@gopherbot gopherbot added this to the Unreleased milestone Aug 13, 2023
@thediveo
Copy link

thediveo commented Aug 13, 2023

Seeing this too. Does opting into the experiment need rebuilding parts of the stdlib, such as fmt?

@bcmills
Copy link
Contributor

bcmills commented Aug 14, 2023

(attn @findleyr @golang/release)

@findleyr
Copy link
Contributor

This is probably due to recompilation of std archives (which are cached following https://go.dev/cl/460635).

Perhaps we should add a special case and build archives with GOEXPERIMENT=loopvar here:
(https://cs.opensource.google/go/x/playground/+/master:Dockerfile;l=90;drc=6821b5629810defb1ea68149e090b5b86576d7ca)

@bcmills can you confirm whether adding a second build of std would suffice? (I'm not familiar with GOEXPERIMENT handling in the Go command).

CC @rsc, who added support for GOEXPERIMENT in https://go.dev/cl/511640.

@bcmills
Copy link
Contributor

bcmills commented Aug 14, 2023

can you confirm whether adding a second build of std would suffice? (I'm not familiar with GOEXPERIMENT handling in the Go command).

Yes, adding GOCACHE=/gocache GOEXPERIMENT=loopvar ./bin/go install --tags=faketime std should suffice.

That said, I question whether the benefit of doing so would be worth the cost, given the need to deploy and maintain it. I hope that the revised loop variable semantics will soon be available without setting GOEXPERIMENT at all. 🙃

@fzipp
Copy link
Contributor

fzipp commented Aug 14, 2023

I hope that the revised loop variable semantics will soon be available without setting GOEXPERIMENT at all. 🙃

It is already available if you select "Go dev branch" on the playground (since fe1daf2)

@findleyr
Copy link
Contributor

@fzipp that's a great point. In that case, I don't think we should bother making this work better for 1.21. It would increase the disk space required for every build, and as @bcmills noted would require maintenance.

@dmitshur dmitshur added Performance NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Aug 14, 2023
@DeedleFake
Copy link

With 1.22 out, this seems to be even worse with GOEXPERIMENT=rangefunc. I'm getting timeouts 100% of the time now with this code.

@go101 go101 changed the title x/playground: "// GOEXPERIMENT=loopvar“ line often causes "timeout running go build” x/playground: "// GOEXPERIMENT=xxx“ line often causes "timeout running go build” Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. Performance
Projects
None yet
Development

No branches or pull requests

8 participants