Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use _validation output group for rustfmt/clippy #2136

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dzbarsky
Copy link
Contributor

@dzbarsky dzbarsky commented Aug 26, 2023

This is a bazel6 feature, see https://bazel.build/extending/rules#validation-actions
http://bazelbuild.github.io/rules_rust/#supported-bazel-versions says bazel6 is the lowest supported version.

This has 2 benefits:

  • Bazel knows these actions are not critical to the build and can schedule them better (towards the end, more parallelism)
  • Users only need to pass one flag per aspect to enable it

I wasn't sure about the change to the rust_clippy rule, I couldn't figure out from the examples in the repo if it was working correctly or not (both with my change and on main). Hopefully it has tests?

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Copy link
Collaborator

@UebelAndre UebelAndre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that could perhaps be behind an experimental flag?

@dzbarsky
Copy link
Contributor Author

dzbarsky commented Sep 5, 2023

Is this something that could perhaps be behind an experimental flag?

I suppose so, are you envisioning a setup where we keep the current output groups and also add the validation output groups (when a flag is enabled)? I think that should work, but it doesn't seem like a big win for users since they'll need to enable this flag instead of enabling a different flag for the output group. I guess it lets us split the rollout over a few releases, do you think folks tend to flip the experimental flags on when taking upgrades?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants