Skip to content

Commit

Permalink
chore: point to non-deprecated rustfmt (#392)
Browse files Browse the repository at this point in the history
* chore: point to non-deprecated rustfmt

See bazelbuild/rules_rust#2703

* chore: upgrade rules_rust

* Update Bar.java
  • Loading branch information
alexeagle authored Sep 17, 2024
1 parent 8f8a95b commit c32ebda
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ bazel_dep(name = "rules_jvm_external", version = "4.5")
bazel_dep(name = "rules_go", version = "0.42.0", repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_proto", version = "6.0.0")
bazel_dep(name = "rules_python", version = "0.26.0")
bazel_dep(name = "rules_rust", version = "0.45.1")
bazel_dep(name = "rules_rust", version = "0.50.1")
bazel_dep(name = "buildifier_prebuilt", version = "6.3.3")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_kotlin", version = "1.9.0")
Expand Down
5 changes: 2 additions & 3 deletions example/WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,8 @@ kt_register_toolchains()

http_archive(
name = "rules_rust",
integrity = "sha256-Eg0TqoZgX2BG0VEhB6qfWrxL5luctWwFhogWgtzYQ78=",
strip_prefix = "rules_rust-4a3ffcb1e89b3f20b12a37b55595682f4bc866b7",
urls = ["https://github.com/bazelbuild/rules_rust/archive/4a3ffcb1e89b3f20b12a37b55595682f4bc866b7.tar.gz"],
integrity = "sha256-MZscNcESBO9WsdlKVJ9rnTUygTt3jwLXCe9oyDcDbPE=",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.50.1/rules_rust-v0.50.1.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
Expand Down
6 changes: 5 additions & 1 deletion example/tools/format/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ format_multirun(
markdown = ":prettier",
protocol_buffer = "//tools/lint:buf",
python = "@aspect_rules_lint//format:ruff",
rust = "@rules_rust//tools/rustfmt:upstream_rustfmt",
# Note, older rules_rust versions may need
# @rules_rust//tools/rustfmt:upstream_rustfmt
# which was later deprecated in
# https://github.com/bazelbuild/rules_rust/pull/2703
rust = "@rules_rust//tools/upstream_wrapper:rustfmt",
scala = ":scalafmt",
shell = "@aspect_rules_lint//format:shfmt",
sql = ":prettier",
Expand Down

0 comments on commit c32ebda

Please sign in to comment.