bazel-contrib / bazel-contrib/buildtools
Buildozer: changing attributes in override functions of MODULE.bazel
- Dominant language
- Go
- Stars
- 1.2k
- Forks
- 471
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 13
Description
Buildozer is not able to recognize the functions with `module_name` in MODULE.bazel file. So `buildozer print //MODULE.bazel:all` would print something like:
```
main module
rules_python bazel_dep
rules_python_gazelle_plugin bazel_dep
gazelle bazel_dep
hermetic_cc_toolchain bazel_dep
bazel_skylib bazel_dep
rules_proto_grpc bazel_dep
archive_override
rules_proto_grpc_python bazel_dep
archive_override
```
Note that the `archive_override` doesn't have name. So we can't update them from command line.
We can follow the convention of Bazel to create a target `rules_proto_grpc~override` when Buildozer sees a *_override rule with `module_name = "rules_proto_grpc"`.
Contributor guide
Research direction
Start by reproducing the `buildozer print //MODULE.bazel:all` output for an override function with `module_name`. Read the Buildozer handling for `MODULE.bazel` override functions and its command-line update path. Done means a `*_override` with `module_name` produces the corresponding `~override` target and can be updated from the command line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- build-system, cli, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100