[gazelle] Allow library and test naming convention to be selected#431
Open
shs96c wants to merge 1 commit intobazel-contrib:mainfrom
Open
[gazelle] Allow library and test naming convention to be selected#431shs96c wants to merge 1 commit intobazel-contrib:mainfrom
shs96c wants to merge 1 commit intobazel-contrib:mainfrom
Conversation
When migrating existing repos to use gazelle, it's likely that there are established naming conventions for targets. For example, some repos may use `lib` as the name for the main `java_library` target in a directory rather than naming it after the directory. This change allows users to choose a naming convention. If nothing is chosen, the existing behaviour is followed.
shs96c
commented
Feb 19, 2026
|
|
||
| func (jei *JavaExportIndex) NewJavaExportResolveInfoFromRule(repoName string, r *rule.Rule, file *rule.File) *JavaExportResolveInfo { | ||
| lbl := label.New(repoName, file.Pkg, r.Name()) | ||
| func (jei *JavaExportIndex) NewJavaExportResolveInfoFromRule(r *rule.Rule, file *rule.File) *JavaExportResolveInfo { |
Collaborator
Author
There was a problem hiding this comment.
The repoName was always the empty string since we only create targets in the main workspace....
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When migrating existing repos to use gazelle, it's likely that there are established naming conventions for targets. For example, some repos may use
libas the name for the mainjava_librarytarget in a directory rather than naming it after the directory.This change allows users to choose a naming convention. If nothing is chosen, the existing behaviour is followed.