-
Notifications
You must be signed in to change notification settings - Fork 374
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
gazelle:resolve_regexp should support regex in label #1821
Comments
@linzhp Hi again! Any chance you could evaluate this when you have a moment? @lkassar-stripe also has a PR ready. |
I can take a look later this week |
Any updates here? Our company (vsco.co) uses gazelle heavily, however we are facing a similar issue as the OP. Namely we have some 50+ generated |
@tyler-french is reviewing the PR |
What version of gazelle are you using?
0.33.0
What version of rules_go are you using?
0.41.0
What version of Bazel are you using?
7.0.1
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
macOS Sonoma 14.0, arm64
Issue
Context: We maintain a large golang repository with gazelle, and we would like gazelle to manage resolution for importpaths that point to targets in an external repository that we have. Although the
gazelle:repository
directive exists, since it operates heuristically, the importpath doesn't match the expected target name that gazelle attempts to resolve it to.We would like to use the
gazelle:resolve_regexp
to solve this.gazelle:resolve_regexp
has an argument for the import-string-regexp and the label it matches to. We'd like to support the label also being a regexp, and populate that regexp with matches from the import-string-regexp.I have a change that would do this, which I will PR after creating this issue, but would like some feedback on the possibility of supporting this in bazel-gazelle, as folks on our team have expressed that this seems intuitive change to the existing directive and would allow us the possibility to use this for many upcoming cases where we need to manipulate gazelle resolves.
The text was updated successfully, but these errors were encountered: