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

Puku should determine the SDK packages at runtime #99

Open
Tatskaari opened this issue Feb 6, 2024 · 1 comment
Open

Puku should determine the SDK packages at runtime #99

Tatskaari opened this issue Feb 6, 2024 · 1 comment

Comments

@Tatskaari
Copy link
Collaborator

Currently we generated the set of known imports up front and embed them in puku to check at runtime. Ideally we'd figure this out from the configured go toolchain for the repo we're working in:

  1. Query the go plugin config to get the configured go tool
  2. If the configured go tool is a build target, build that target first
  3. Run go env goroot to determine the sdk root
  4. Walk the packages building up a list of known import paths in a similar way to https://github.com/please-build/puku/pull/86/files#diff-f2c1015540a78e5b02bfd9676b75655150160783c03ca98c5f3d57c2d719a705R2
@peterebden
Copy link
Contributor

I think this would be cleaner if we require repos to use go_stdlib, then we can just discover the importconfig from that in essentially the same way as any other Go dependency.

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

2 participants