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 Issues related to static analysis (vet, x/tools/go/analysis) FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@jwebb
Copy link

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
Member

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 Issues related to static analysis (vet, x/tools/go/analysis) label May 20, 2022
@timothy-king
Copy link
Contributor

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

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 Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. and removed Proposal labels May 25, 2022
@ianlancetaylor ianlancetaylor modified the milestones: Proposal, Backlog May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Analysis Issues related to static analysis (vet, x/tools/go/analysis) FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

6 participants