From 484f4aed24738d0769fcaa41c38ba6f4bb19b817 Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Mon, 9 Oct 2023 22:34:16 +0000 Subject: [PATCH] Remove _rust_env_attr from CrateInfo --- proto/prost/private/prost.bzl | 1 - proto/protobuf/proto.bzl | 1 - rust/private/providers.bzl | 2 -- rust/private/rust.bzl | 2 -- test/unit/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 - 7 files changed, 9 deletions(-) diff --git a/proto/prost/private/prost.bzl b/proto/prost/private/prost.bzl index 1db20021a6..b070227b61 100644 --- a/proto/prost/private/prost.bzl +++ b/proto/prost/private/prost.bzl @@ -173,7 +173,6 @@ def _compile_rust(ctx, attr, crate_name, src, deps, edition): edition = edition, is_test = False, rustc_env = {}, - _rustc_env_attr = {}, compile_data = depset([]), compile_data_targets = depset([]), owner = ctx.label, diff --git a/proto/protobuf/proto.bzl b/proto/protobuf/proto.bzl index 6ff45cc2a8..a45b3f20a9 100644 --- a/proto/protobuf/proto.bzl +++ b/proto/protobuf/proto.bzl @@ -225,7 +225,6 @@ def _rust_proto_compile(protos, descriptor_sets, imports, crate_name, ctx, is_gr metadata = rust_metadata, edition = proto_toolchain.edition, rustc_env = {}, - _rustc_env_attr = {}, is_test = False, compile_data = depset([target.files for target in getattr(ctx.attr, "compile_data", [])]), compile_data_targets = depset(getattr(ctx.attr, "compile_data", [])), diff --git a/rust/private/providers.bzl b/rust/private/providers.bzl index b2fced7442..e4db9c9f9d 100644 --- a/rust/private/providers.bzl +++ b/rust/private/providers.bzl @@ -41,8 +41,6 @@ CrateInfo = provider( "str, optional: The original crate type for targets generated using a previously defined " + "crate (typically tests using the `rust_test::crate` attribute)" ), - # TODO: Remove `_rustc_env_attr` after refactoring rust_test to only rely on rustc_env - "_rustc_env_attr": "Dict[String, String]: Additional `\"key\": \"value\"` environment variables to set for rustc.", }, ) diff --git a/rust/private/rust.bzl b/rust/private/rust.bzl index bb041c3ca2..6f375defb7 100644 --- a/rust/private/rust.bzl +++ b/rust/private/rust.bzl @@ -200,7 +200,6 @@ def _rust_library_common(ctx, crate_type): compile_data = depset(ctx.files.compile_data), compile_data_targets = depset(ctx.attr.compile_data), owner = ctx.label, - # _rustc_env_attr = ctx.attr.rustc_env, ), ) @@ -241,7 +240,6 @@ def _rust_binary_impl(ctx): aliases = ctx.attr.aliases, output = output, edition = get_edition(ctx.attr, toolchain, ctx.label), - # _rustc_env_attr = ctx.attr.rustc_env, rustc_env = ctx.attr.rustc_env, rustc_env_files = ctx.files.rustc_env_files, is_test = False, 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 7a3bca6012..cd02617500 100644 --- a/test/unit/consistent_crate_name/with_modified_crate_name.bzl +++ b/test/unit/consistent_crate_name/with_modified_crate_name.bzl @@ -47,7 +47,6 @@ def _with_modified_crate_name_impl(ctx): compile_data = depset([]), compile_data_targets = depset([]), rustc_env = {}, - _rustc_env_attr = {}, is_test = False, ), output_hash = output_hash, diff --git a/test/unit/force_all_deps_direct/generator.bzl b/test/unit/force_all_deps_direct/generator.bzl index 959687c6b6..6501b36215 100644 --- a/test/unit/force_all_deps_direct/generator.bzl +++ b/test/unit/force_all_deps_direct/generator.bzl @@ -63,7 +63,6 @@ EOF compile_data = depset([]), compile_data_targets = depset([]), rustc_env = {}, - _rustc_env_attr = {}, is_test = False, ), output_hash = output_hash, diff --git a/test/unit/pipelined_compilation/wrap.bzl b/test/unit/pipelined_compilation/wrap.bzl index 7ceef1c021..9a7a2d2157 100644 --- a/test/unit/pipelined_compilation/wrap.bzl +++ b/test/unit/pipelined_compilation/wrap.bzl @@ -73,7 +73,6 @@ EOF compile_data = depset([]), compile_data_targets = depset([]), rustc_env = {}, - _rustc_env_attr = {}, is_test = False, ), output_hash = output_hash,