-
Notifications
You must be signed in to change notification settings - Fork 424
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
Also generate import
-style targets with Gazelle
#1173
Conversation
Since the repo uses checked-in build files, it should support both the `import` and `go_default_library` naming conventions supported by Gazelle to ensure that it works with all possible values of the `gazelle:go_naming_convention_external` directive. This is achieved by using `gazelle:go_naming_convention import_alias`.
CC @cgrindel |
Former 'go_default_test` rules don't have aliases, is that expected? Is that not part of the convention anymore? |
I'm not entirely sure whether this changed at some point, but as far as I understood the convention the aliases exist just to ensure references from other repos to this repo aren't broken. Other repos would not reference tests, so aliases for them shouldn't be needed. |
@vladmos Friendly ping on this, it would definitely make downstream users' lives easier. :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@fmeum Do you need a new release with these changes or just having them in the repo enough for now? |
@vladmos This particular change is fine without a release - in fact, Go doesn't see the releases since their major versions don't match the import path. |
Since the repo uses checked-in build files, it should support both the `import` and `go_default_library` naming conventions supported by Gazelle to ensure that it works with all possible values of the `gazelle:go_naming_convention_external` directive. This is achieved by using `gazelle:go_naming_convention import_alias`.
Since the repo uses checked-in build files, it should support both the
import
andgo_default_library
naming conventions supported by Gazelle to ensure that it works with all possible values of thegazelle:go_naming_convention_external
directive.This is achieved by using
gazelle:go_naming_convention import_alias
.Fixes bazel-contrib/bazel-gazelle#1557