bazel-contrib / bazel-gazelle

Gazelle is a Bazel build file generator for Bazel projects. It natively supports Go and protobuf, and it may be extended to support new languages and custom rule sets.
Apache License 2.0
1.19k stars 378 forks source link

Add gazelle overrides to enable building rclone #1933

Closed dmcardle closed 3 weeks ago

dmcardle commented 3 weeks ago

I was just toying around with Gazelle and the rclone project (see https://github.com/rclone/rclone/issues/8093). These changes were necessary, but not sufficient, to build //:rclone with Gazelle-generated BUILD files.

I also needed to make a change for hdfs in my MODULE.bazel, but someone already beat me to it in https://github.com/bazelbuild/bazel-gazelle/pull/1867. I solved my problem with gazelle:proto legacy, but it looks like the existing override does something different.

What type of PR is this?

Uncomment one line below and remove others.

Bug fix Feature Documentation

Other

What package or component does this PR mostly affect?

For example:

language/go cmd/gazelle go_repository all

bzlmod

What does this PR do? Why is it needed?

Adds default overrides for some Go dependencies of the rclone project.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

dmcardle commented 3 weeks ago

For future reference, I based this change on these changes in my MODULE.bazel: https://github.com/dmcardle/rclone/blob/d449582ee110aa9656e9533759421f6ec1b3a0af/MODULE.bazel#L126-L149