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

Avoid using packages.Load if possible #181

Open
FastNav opened this issue Jun 16, 2021 · 0 comments
Open

Avoid using packages.Load if possible #181

FastNav opened this issue Jun 16, 2021 · 0 comments

Comments

@FastNav
Copy link

FastNav commented Jun 16, 2021

See golang/mock#420 for an example of how one can avoid using packages.Load in mock generation. This increases performance.

Full disclosure: this would also be useful for creating a Bazel wrapper around Counterfeiter because:

  • Bazel projects typically have a lot of packages in the transitive closure of dependencies, so packages.Load is a
    particularly large pain point that must be re-invoked across every package
  • It might allow a partially generated GOPATH to be used instead of a complete GOPATH, which would make things even
    faster since the Bazel go_path rule can be invoked non-recursively on a small subset of the transitive closure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant