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

FR: Support tool directive in go.mod #2031

Open
phst opened this issue Feb 11, 2025 · 2 comments
Open

FR: Support tool directive in go.mod #2031

phst opened this issue Feb 11, 2025 · 2 comments

Comments

@phst
Copy link

phst commented Feb 11, 2025

Go 1.24 supports tool directives in go.mod, cf. https://go.dev/doc/go1.24#tools and https://go.dev/doc/modules/gomod-ref#tool. Gazelle doesn't support this yet (https://github.com/bazel-contrib/bazel-gazelle/blob/v0.42.0/internal/bzlmod/go_mod.bzl#L213).

phst added a commit to phst/license_test that referenced this issue Feb 11, 2025
@fmeum
Copy link
Member

fmeum commented Feb 11, 2025

It looks like we could support that simply by ignoring the directive as gazelle always generates binary targets for tools. Do you agree?

@phst
Copy link
Author

phst commented Feb 12, 2025

I guess so, it's worth a try :)

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