Closed
Description
🚀 feature request
Creating this issue to encompass all of the PRs related to this feature, as the single research PR (#961) got a little bit too big for easy review.
Relevant Rules
gazelle
Python plugin.
Description
Currently the gazelle
plugin does not work if using bzlmod
with bazel >= 6.0.0
. This is due to:
- Gazelle and go toolchain is not present in
MODULE.bazel
ofrules_python
, which means that the plugin reference fails. - The
all_whl_requirements
have labels, that do not work inbzlmod
due to repository remapping. Hence, themodules_mapping
rule fails unless we do something about it. - Gazelle will generate dependency labels in the targets that do not work in
bzlmod
due to repository remapping.
Describe the solution you'd like
As researched in #961, we can fix these three issues separately:
- Adding gazelle and go as bzlmod deps.
- Changing the contents of the
all_whl_requirements
andall_requirements
based on wetherbzlmod
is used. - Have extra declaratives for changing the generated labels to work with bzlmod.
- Have extra aliases in the
@pip
repo that work with both,bzlmod
and classic gazelle. This might be similar to feat: add alias generation for pip parse #814, however this is not a requirement to make gazelle withbzlmod
work.
Describe alternatives you've considered
Rejected alternatives:
- Having a flag in
gazelle_python.yaml
manifest, which would say that we are usingbzlmod
. The manifest should be the same irrespective of whether we are usingbzlmod
or not due to the same reason why we may want to have aliases in@pip
repo -- because we want to enable a smooth transition tobzlmod
as described in the migration guide
Metadata
Metadata
Assignees
Labels
No labels