feat: Migrate clippy to rules_rs#846
Conversation
|
30833c1 to
96593b4
Compare
34eb629 to
91c1456
Compare
8c43f5c to
46f0384
Compare
| rules_lint_go_deps.gazelle_override( | ||
| build_file_generation = "clean", | ||
| directives = [ | ||
| "gazelle:proto disable", |
There was a problem hiding this comment.
omg... why is this suddenly required? 🤦
There was a problem hiding this comment.
this is what i was mentioning on slack...transitive rules_cc bump bumps protobuf, which is no longer compatible with the version expected in this go module upstream. But we don't even need their protos so just kill them. Gazelle should be configured like this by default...
There was a problem hiding this comment.
What's less code... this gazelle override or a single_version_override for protobuf?
There was a problem hiding this comment.
I think it's about the same. We need an override in each example module just like this... Happy to swap if you prefer
There was a problem hiding this comment.
But single_version_override() on protobuf avoids any use of gazelle? It would just be:
# Explain WTF this is for in one line comment
single_version_override(module_name = "protobuf", version = "X")
?
There was a problem hiding this comment.
not quite that simple, you would first need to add bazel_dep(protobuf) and then be able to override. but yeah i suppose it's a few lines shorter. Sounds like you'd prefer I swap, i can try
There was a problem hiding this comment.
You can pin versions without direct deps on them actually, but it will fail if the dep doesn't exist in your dep graph.
There was a problem hiding this comment.
ah, maybe that's what i was thinking of, thanks for reminding me
| "Bazel dependencies for Ruby formatting and linting example" | ||
|
|
||
| bazel_dep(name = "aspect_rules_lint") | ||
| bazel_dep(name = "rules_ruby", version = "0.21.1") |

rules_rs is (in my biased opinion) a more ergonomic and cleaner ruleset that avoids many of the pain points associated with rules_rust usage. It's also a better bzlmod citizen because it doesn't force registration of unwanted toolchains and lead to many unwanted downloads.
Currently rules_rs users who pull in rules_lint get the rules_rust
bazel_depand are unable to use the functionality here, while also being forced to register toolchains they don't want or need. I want to be able to recommend rules_lint to my users rather than telling them this ruleset doesn't interop with rules_rs. For example: hermeticbuild/rules_rs#97Migration
Existing rules_rust users are encouraged to migrate to rules_rs to realize the benefits, though they can also make the new clippy support work for them via the following the rules_rs setup instructions, specifically:
adding the following MODULE.bazel snippet
Configuring their
--host_platformin.bazelrcif they are on Windows or Linux (Mac should just work):