From 9d01cb5bc73cb56f0ce8181ec34724f8e7620d35 Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Tue, 19 Dec 2023 11:16:35 +0000 Subject: [PATCH] remove incompatible_override_toolchain_transition This has been a no-op since Bazel 5. We're at min Bazel version 6.3. --- bindgen/private/bindgen.bzl | 1 - cargo/private/cargo_build_script.bzl | 1 - proto/prost/private/prost.bzl | 1 - proto/protobuf/proto.bzl | 6 ------ rust/private/clippy.bzl | 1 - rust/private/rust.bzl | 8 -------- rust/private/rust_analyzer.bzl | 3 --- rust/private/rustdoc.bzl | 1 - rust/private/rustdoc_test.bzl | 1 - rust/private/rustfmt.bzl | 4 ---- rust/private/toolchain_utils.bzl | 2 -- rust/toolchain.bzl | 1 - .../consistent_crate_name/with_modified_crate_name.bzl | 1 - test/unit/force_all_deps_direct/generator.bzl | 1 - test/unit/pipelined_compilation/wrap.bzl | 1 - wasm_bindgen/private/wasm_bindgen.bzl | 1 - wasm_bindgen/rules_js/defs.bzl | 1 - wasm_bindgen/rules_nodejs/defs.bzl | 1 - 18 files changed, 36 deletions(-) diff --git a/bindgen/private/bindgen.bzl b/bindgen/private/bindgen.bzl index aba04694f4..7e408fa881 100644 --- a/bindgen/private/bindgen.bzl +++ b/bindgen/private/bindgen.bzl @@ -210,7 +210,6 @@ rust_bindgen = rule( str(Label("//rust/rustfmt:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) def _rust_bindgen_toolchain_impl(ctx): diff --git a/cargo/private/cargo_build_script.bzl b/cargo/private/cargo_build_script.bzl index 91ccb46141..d90b3cb997 100644 --- a/cargo/private/cargo_build_script.bzl +++ b/cargo/private/cargo_build_script.bzl @@ -364,7 +364,6 @@ cargo_build_script = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) def _merge_env_dict(prefix_dict, suffix_dict): diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index a760361a7d..ea58691f79 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -309,7 +309,6 @@ rust_prost_aspect = aspect( "@rules_rust//rust:toolchain_type", "@rules_rust//rust/rustfmt:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) def _rust_prost_library_impl(ctx): diff --git a/proto/protobuf/proto.bzl b/proto/protobuf/proto.bzl index a45b3f20a9..7b2543052a 100644 --- a/proto/protobuf/proto.bzl +++ b/proto/protobuf/proto.bzl @@ -331,9 +331,6 @@ rust_proto_library = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - # TODO: Remove once (bazelbuild/bazel#11584) is closed and the rules use - # the version of Bazel that issue was closed on as the min supported version - incompatible_use_toolchain_transition = True, doc = """\ Builds a Rust library crate from a set of `proto_library`s. @@ -427,9 +424,6 @@ rust_grpc_library = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - # TODO: Remove once (bazelbuild/bazel#11584) is closed and the rules use - # the version of Bazel that issue was closed on as the min supported version - incompatible_use_toolchain_transition = True, doc = """\ Builds a Rust library crate from a set of `proto_library`s suitable for gRPC. diff --git a/rust/private/clippy.bzl b/rust/private/clippy.bzl index d124c71f33..9fd9842ce6 100644 --- a/rust/private/clippy.bzl +++ b/rust/private/clippy.bzl @@ -241,7 +241,6 @@ rust_clippy_aspect = aspect( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, implementation = _clippy_aspect_impl, doc = """\ Executes the clippy checker on specified targets. diff --git a/rust/private/rust.bzl b/rust/private/rust.bzl index f0ea7773a5..beb14cd868 100644 --- a/rust/private/rust.bzl +++ b/rust/private/rust.bzl @@ -779,7 +779,6 @@ rust_library = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust library crate. @@ -879,7 +878,6 @@ rust_static_library = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust static library. @@ -927,7 +925,6 @@ rust_shared_library = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust shared library. @@ -979,7 +976,6 @@ rust_proc_macro = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust proc-macro crate. """), @@ -1060,7 +1056,6 @@ rust_binary = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust binary crate. @@ -1204,7 +1199,6 @@ rust_binary_without_process_wrapper = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) rust_library_without_process_wrapper = rule( @@ -1217,7 +1211,6 @@ rust_library_without_process_wrapper = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) def _rust_test_transition_impl(settings, attr): @@ -1256,7 +1249,6 @@ rust_test = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Builds a Rust test crate. diff --git a/rust/private/rust_analyzer.bzl b/rust/private/rust_analyzer.bzl index eaf9c227e5..6b601c8fc2 100644 --- a/rust/private/rust_analyzer.bzl +++ b/rust/private/rust_analyzer.bzl @@ -187,7 +187,6 @@ rust_analyzer_aspect = aspect( attr_aspects = ["deps", "proc_macro_deps", "crate", "actual", "proto"], implementation = _rust_analyzer_aspect_impl, toolchains = [str(Label("//rust:toolchain_type"))], - incompatible_use_toolchain_transition = True, doc = "Annotates rust rules with RustAnalyzerInfo later used to build a rust-project.json", ) @@ -293,7 +292,6 @@ rust_analyzer_toolchain = rule( mandatory = True, ), }, - incompatible_use_toolchain_transition = True, ) def _rust_analyzer_detect_sysroot_impl(ctx): @@ -342,7 +340,6 @@ rust_analyzer_detect_sysroot = rule( "@rules_rust//rust:toolchain_type", "@rules_rust//rust/rust_analyzer:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Detect the sysroot and store in a file for use by the gen_rust_project tool. """), diff --git a/rust/private/rustdoc.bzl b/rust/private/rustdoc.bzl index 5fa82b8144..e84e7f2f01 100644 --- a/rust/private/rustdoc.bzl +++ b/rust/private/rustdoc.bzl @@ -344,5 +344,4 @@ rust_doc = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, ) diff --git a/rust/private/rustdoc_test.bzl b/rust/private/rustdoc_test.bzl index 79b0f4dd84..458ccf00bb 100644 --- a/rust/private/rustdoc_test.bzl +++ b/rust/private/rustdoc_test.bzl @@ -235,7 +235,6 @@ rust_doc_test = rule( str(Label("//rust:toolchain_type")), "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = dedent("""\ Runs Rust documentation tests. diff --git a/rust/private/rustfmt.bzl b/rust/private/rustfmt.bzl index dacdd7be93..7c200bb4e6 100644 --- a/rust/private/rustfmt.bzl +++ b/rust/private/rustfmt.bzl @@ -146,7 +146,6 @@ generated source files are also ignored by this aspect. default = Label("//util/process_wrapper"), ), }, - incompatible_use_toolchain_transition = True, required_providers = [ [rust_common.crate_info], [rust_common.test_crate_info], @@ -188,7 +187,6 @@ Output Groups: - `rustfmt_manifest`: A manifest used by rustfmt binaries to provide crate specific settings. """, - incompatible_use_toolchain_transition = True, fragments = ["cpp"], host_fragments = ["cpp"], toolchains = [ @@ -299,7 +297,6 @@ def _rustfmt_toolchain_impl(ctx): rustfmt_toolchain = rule( doc = "A toolchain for [rustfmt](https://rust-lang.github.io/rustfmt/)", implementation = _rustfmt_toolchain_impl, - incompatible_use_toolchain_transition = True, attrs = { "rustc": attr.label( doc = "The location of the `rustc` binary. Can be a direct source or a filegroup containing one item.", @@ -342,5 +339,4 @@ current_rustfmt_toolchain = rule( toolchains = [ str(Label("@rules_rust//rust/rustfmt:toolchain_type")), ], - incompatible_use_toolchain_transition = True, ) diff --git a/rust/private/toolchain_utils.bzl b/rust/private/toolchain_utils.bzl index f92ad9ca76..4fb2ae83e3 100644 --- a/rust/private/toolchain_utils.bzl +++ b/rust/private/toolchain_utils.bzl @@ -75,7 +75,6 @@ toolchain_files = rule( toolchains = [ str(Label("//rust:toolchain_type")), ], - incompatible_use_toolchain_transition = True, ) def _current_rust_toolchain_impl(ctx): @@ -95,5 +94,4 @@ current_rust_toolchain = rule( toolchains = [ str(Label("@rules_rust//rust:toolchain_type")), ], - incompatible_use_toolchain_transition = True, ) diff --git a/rust/toolchain.bzl b/rust/toolchain.bzl index f2cf3c7468..a9b2e1f5af 100644 --- a/rust/toolchain.bzl +++ b/rust/toolchain.bzl @@ -826,7 +826,6 @@ rust_toolchain = rule( toolchains = [ "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, doc = """Declares a Rust toolchain for use. This is for declaring a custom toolchain, eg. for configuring a particular version of rust or supporting a new platform. diff --git a/test/unit/consistent_crate_name/with_modified_crate_name.bzl b/test/unit/consistent_crate_name/with_modified_crate_name.bzl index cd02617500..6fb96164c1 100644 --- a/test/unit/consistent_crate_name/with_modified_crate_name.bzl +++ b/test/unit/consistent_crate_name/with_modified_crate_name.bzl @@ -76,6 +76,5 @@ with_modified_crate_name = rule( "@rules_rust//rust:toolchain_type", "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, fragments = ["cpp"], ) diff --git a/test/unit/force_all_deps_direct/generator.bzl b/test/unit/force_all_deps_direct/generator.bzl index 6501b36215..98284e9eae 100644 --- a/test/unit/force_all_deps_direct/generator.bzl +++ b/test/unit/force_all_deps_direct/generator.bzl @@ -90,6 +90,5 @@ generator = rule( "@rules_rust//rust:toolchain_type", "@bazel_tools//tools/cpp:toolchain_type", ], - incompatible_use_toolchain_transition = True, fragments = ["cpp"], ) diff --git a/test/unit/pipelined_compilation/wrap.bzl b/test/unit/pipelined_compilation/wrap.bzl index 9a7a2d2157..09c2a6c737 100644 --- a/test/unit/pipelined_compilation/wrap.bzl +++ b/test/unit/pipelined_compilation/wrap.bzl @@ -98,6 +98,5 @@ wrap = rule( ), }, toolchains = ["@rules_rust//rust:toolchain", "@bazel_tools//tools/cpp:toolchain_type"], - incompatible_use_toolchain_transition = True, fragments = ["cpp"], ) diff --git a/wasm_bindgen/private/wasm_bindgen.bzl b/wasm_bindgen/private/wasm_bindgen.bzl index 8607912b00..458319e8ea 100644 --- a/wasm_bindgen/private/wasm_bindgen.bzl +++ b/wasm_bindgen/private/wasm_bindgen.bzl @@ -152,7 +152,6 @@ An example of this rule in use can be seen at [@rules_rust//examples/wasm](../ex toolchains = [ str(Label("//wasm_bindgen:toolchain_type")), ], - incompatible_use_toolchain_transition = True, ) def _rust_wasm_bindgen_toolchain_impl(ctx): diff --git a/wasm_bindgen/rules_js/defs.bzl b/wasm_bindgen/rules_js/defs.bzl index 01d55a5c79..37777f2758 100644 --- a/wasm_bindgen/rules_js/defs.bzl +++ b/wasm_bindgen/rules_js/defs.bzl @@ -45,5 +45,4 @@ An example of this rule in use can be seen at [@rules_rust//examples/wasm_bindge toolchains = [ str(Label("//wasm_bindgen:toolchain_type")), ], - incompatible_use_toolchain_transition = True, ) diff --git a/wasm_bindgen/rules_nodejs/defs.bzl b/wasm_bindgen/rules_nodejs/defs.bzl index 6ac417fb0d..9004cfb530 100644 --- a/wasm_bindgen/rules_nodejs/defs.bzl +++ b/wasm_bindgen/rules_nodejs/defs.bzl @@ -48,5 +48,4 @@ An example of this rule in use can be seen at [@rules_rust//examples/wasm_bindge toolchains = [ str(Label("//wasm_bindgen:toolchain_type")), ], - incompatible_use_toolchain_transition = True, )