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

remove incompatible_override_toolchain_transition #2344

Merged
merged 4 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion bindgen/private/bindgen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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):
Expand Down
1 change: 0 additions & 1 deletion cargo/private/cargo_build_script.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,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):
Expand Down
1 change: 0 additions & 1 deletion proto/prost/private/prost.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
6 changes: 0 additions & 6 deletions proto/protobuf/proto.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
1 change: 0 additions & 1 deletion rust/private/clippy.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 0 additions & 8 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,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.

Expand Down Expand Up @@ -902,7 +901,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.

Expand Down Expand Up @@ -950,7 +948,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.

Expand Down Expand Up @@ -1004,7 +1001,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.
"""),
Expand Down Expand Up @@ -1085,7 +1081,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.

Expand Down Expand Up @@ -1229,7 +1224,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(
Expand All @@ -1242,7 +1236,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):
Expand Down Expand Up @@ -1281,7 +1274,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.

Expand Down
3 changes: 0 additions & 3 deletions rust/private/rust_analyzer.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)

Expand Down Expand Up @@ -293,7 +292,6 @@ rust_analyzer_toolchain = rule(
mandatory = True,
),
},
incompatible_use_toolchain_transition = True,
)

def _rust_analyzer_detect_sysroot_impl(ctx):
Expand Down Expand Up @@ -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.
"""),
Expand Down
1 change: 0 additions & 1 deletion rust/private/rustdoc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,4 @@ rust_doc = rule(
str(Label("//rust:toolchain_type")),
"@bazel_tools//tools/cpp:toolchain_type",
],
incompatible_use_toolchain_transition = True,
)
1 change: 0 additions & 1 deletion rust/private/rustdoc_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
4 changes: 0 additions & 4 deletions rust/private/rustfmt.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -342,5 +339,4 @@ current_rustfmt_toolchain = rule(
toolchains = [
str(Label("@rules_rust//rust/rustfmt:toolchain_type")),
],
incompatible_use_toolchain_transition = True,
)
2 changes: 0 additions & 2 deletions rust/private/toolchain_utils.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ toolchain_files = rule(
toolchains = [
str(Label("//rust:toolchain_type")),
],
incompatible_use_toolchain_transition = True,
)

def _current_rust_toolchain_impl(ctx):
Expand All @@ -95,5 +94,4 @@ current_rust_toolchain = rule(
toolchains = [
str(Label("@rules_rust//rust:toolchain_type")),
],
incompatible_use_toolchain_transition = True,
)
1 change: 0 additions & 1 deletion rust/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
)
1 change: 0 additions & 1 deletion test/unit/force_all_deps_direct/generator.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,5 @@ generator = rule(
"@rules_rust//rust:toolchain_type",
"@bazel_tools//tools/cpp:toolchain_type",
],
incompatible_use_toolchain_transition = True,
fragments = ["cpp"],
)
1 change: 0 additions & 1 deletion test/unit/pipelined_compilation/wrap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,5 @@ wrap = rule(
),
},
toolchains = ["@rules_rust//rust:toolchain", "@bazel_tools//tools/cpp:toolchain_type"],
incompatible_use_toolchain_transition = True,
fragments = ["cpp"],
)
1 change: 0 additions & 1 deletion wasm_bindgen/private/wasm_bindgen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion wasm_bindgen/rules_js/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
1 change: 0 additions & 1 deletion wasm_bindgen/rules_nodejs/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Loading