Support gazelle plugin when using bzlmod #961
Closed
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.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
gazelle
does not work with rules_python when using bzlmod.What is the new behavior?
gazelle
works with rules_python when using bzlmod.Does this PR introduce a breaking change?
Change summary
Add gazelle target definition and fix bzlmod dependencies
Since with bzlmod we have isolation of module workspace, we only need to add
gazelle
to the example and there is no need to setup the go toolchain, which is an improvement over non-bzlmod usage.Add modules_map generation based on the whl list
Even though I am changing the contents of the
all_requirements
andall_whl_requirements
inbzlmod
usecases, I believe these variables where not previously usable underbzlmod
, so it should be fine.Add gazelle_python_manifest generation to the example
The manifest generation part did not need any changes.
Allow configuring the pip dependency naming convention
This also allows us to support the multi-platform Python builds as described in https://www.youtube.com/watch?v=Bjaiu8tZZhs. The alias targets may be defined under
//third_party/pip:$distribution_name$_pkg
, so using the newly addedgazelle
directives allows the alias targets to be used by gazelle.