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

cmd/go: test -c rebuilds even when target is up to date #15799

Closed
rsc opened this issue May 23, 2016 · 3 comments
Closed

cmd/go: test -c rebuilds even when target is up to date #15799

rsc opened this issue May 23, 2016 · 3 comments

Comments

@rsc
Copy link
Contributor

@rsc rsc commented May 23, 2016

cd $GOROOT/src/expvar
go test -c
go test -x -c

shows that the second command does rebuild the test package from the test sources and then rebuild the test binary. If the target test binary exists and has the right build ID, it should be possible to avoid that. This causes headaches for Kubernetes (for example kubernetes/kubernetes#24850) and likely other large projects.

The exact package doesn't matter much; I am using expvar in the example because I know that the testing package does not depend on expvar, which might complicate the analysis.

@bradfitz

This comment has been minimized.

Copy link
Member

@bradfitz bradfitz commented Jun 8, 2017

Punting to Go 1.10.

@rsc

This comment has been minimized.

Copy link
Contributor Author

@rsc rsc commented Jun 9, 2017

My new caching should fix this in Go 1.10.

@gopherbot

This comment has been minimized.

Copy link

@gopherbot gopherbot commented Oct 25, 2017

Change https://golang.org/cl/73212 mentions this issue: cmd/go: switch to entirely content-based staleness determination

@gopherbot gopherbot closed this in 7dea509 Oct 31, 2017
@golang golang locked and limited conversation to collaborators Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.