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/vet: cache vet results #53014

Open
jwebb opened this issue May 20, 2022 · 4 comments
Open

cmd/vet: cache vet results #53014

jwebb opened this issue May 20, 2022 · 4 comments
Labels
Analysis FeatureRequest NeedsInvestigation
Milestone

Comments

@jwebb
Copy link

@jwebb jwebb commented May 20, 2022

go vet on a large codebase can take a nontrivial amount of time. It seems the Vet result for each package should be cacheable in much the same way as tests, i.e. the cache key is a combination of BuildID and Vet command line flags.

@jwebb jwebb added the Proposal label May 20, 2022
@gopherbot gopherbot added this to the Proposal milestone May 20, 2022
@seankhliao
Copy link
Contributor

@seankhliao seankhliao commented May 20, 2022

cc @matloob

@seankhliao seankhliao changed the title proposal: cmd/vet: Cache vet results proposal: cmd/vet: cache vet results May 20, 2022
@timothy-king timothy-king added the Analysis label May 20, 2022
@timothy-king
Copy link
Contributor

@timothy-king timothy-king commented May 20, 2022

You will also need to know if the vettool argument updated. This could be something like taking the hash of the binary at /path/to/tool when given -vettool=/path/to/tool.

@mvdan
Copy link
Member

@mvdan mvdan commented May 20, 2022

@timothy-king if we can assume that the vettool program is in Go, I imagine we could use something akin to go tool buildid to obtain the hash embedded in the binary. It doesn't make a big difference in terms of design, just an FYI.

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented May 25, 2022

This is an optimization that is not visible to users, so taking this out of the proposal process.

@ianlancetaylor ianlancetaylor changed the title proposal: cmd/vet: cache vet results cmd/vet: cache vet results May 25, 2022
@ianlancetaylor ianlancetaylor added NeedsInvestigation and removed Proposal labels May 25, 2022
@ianlancetaylor ianlancetaylor removed this from the Proposal milestone May 25, 2022
@ianlancetaylor ianlancetaylor added this to the Backlog milestone May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis FeatureRequest NeedsInvestigation
Projects
None yet
Development

No branches or pull requests

6 participants