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
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@rsc
Copy link
Contributor

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.

@rsc rsc added this to the Go1.8 milestone May 23, 2016
@quentinmit quentinmit added the NeedsFix The path to resolution is known, but the work has not been done. label Oct 6, 2016
@rsc rsc modified the milestones: Go1.9, Go1.8 Nov 11, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Jun 8, 2017

Punting to Go 1.10.

@bradfitz bradfitz modified the milestones: Go1.10, Go1.9 Jun 8, 2017
@rsc
Copy link
Contributor Author

rsc commented Jun 9, 2017

My new caching should fix this in Go 1.10.

@gopherbot
Copy link

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

@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.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants