From f9f257aa253df76138c3d927995a930309723c9b Mon Sep 17 00:00:00 2001 From: James Wainwright Date: Mon, 26 Aug 2024 15:24:46 +0100 Subject: [PATCH] [bazel] Load `import_deps` for `rules_rust` Even though we're not using these, Bazel 7 hits errors if we try to run `bazel query deps($something)` on a Rust dependency. Fixed in `rules_rust>=0.38.0`. https://github.com/bazelbuild/rules_rust/issues/1166#issuecomment-1060888166 Signed-off-by: James Wainwright --- third_party/rust/deps.bzl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/third_party/rust/deps.bzl b/third_party/rust/deps.bzl index ea5dba2a2e891..0196684568159 100644 --- a/third_party/rust/deps.bzl +++ b/third_party/rust/deps.bzl @@ -5,6 +5,7 @@ load("@rules_rust//bindgen:repositories.bzl", "rust_bindgen_dependencies") load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set") load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies") +load("@rules_rust//util/import:deps.bzl", "import_deps") def rust_deps(): rules_rust_dependencies() @@ -25,3 +26,9 @@ def rust_deps(): ) rust_analyzer_dependencies() + + # We're not using this feature, but have to load the deps in Bazel 7 due to + # https://github.com/bazelbuild/rules_rust/issues/1166#issuecomment-1060888166 + # + # This is no longer needed for `rules_rust>=0.38.0`. + import_deps()