From 87be14c9eba5473ed7792aff4d1ec5feb39b356e Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Mon, 9 Oct 2023 21:06:36 +0000 Subject: [PATCH] Fix comments --- proto/protobuf/proto.bzl | 1 - rust/private/rustc.bzl | 7 +------ .../consistent_crate_name/with_modified_crate_name.bzl | 2 -- test/unit/force_all_deps_direct/generator.bzl | 3 --- test/unit/pipelined_compilation/wrap.bzl | 3 --- 5 files changed, 1 insertion(+), 15 deletions(-) diff --git a/proto/protobuf/proto.bzl b/proto/protobuf/proto.bzl index 401a9e5038..6ff45cc2a8 100644 --- a/proto/protobuf/proto.bzl +++ b/proto/protobuf/proto.bzl @@ -20,7 +20,6 @@ load( _generate_proto = "rust_generate_proto", _generated_file_stem = "generated_file_stem", ) -load("//rust:defs.bzl", "rust_common") # buildifier: disable=bzl-visibility load("//rust/private:rustc.bzl", "rustc_compile_action") diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl index db07f6adba..c972e4783e 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl @@ -1095,13 +1095,11 @@ def rustc_compile_action( ctx (ctx): The rule's context object attr (struct): Attributes to use for the rust compile action toolchain (rust_toolchain): The current `rust_toolchain` - crate_type: TODO - crate_info (CrateInfo): The CrateInfo provider for the current target. output_hash (str, optional): The hashed path of the crate root. Defaults to None. rust_flags (list, optional): Additional flags to pass to rustc. Defaults to []. force_all_deps_direct (bool, optional): Whether to pass the transitive rlibs with --extern to the commandline as opposed to -L. - create_crate_info_callback: A callback to construct a mutable dict for constructor CrateInfo + crate_info_dict: A mutable dict used to create CrateInfo provider skip_expanding_rustc_env (bool, optional): Whether to expand CrateInfo.rustc_env Returns: @@ -1110,9 +1108,6 @@ def rustc_compile_action( - (DepInfo): The transitive dependencies of this crate. - (DefaultInfo): The output file for this crate, and its runfiles. """ - - # TODO: Remove create_crate_info_callback after all rustc_compile_action callers migrate to - # removing CrateInfo construction before `rust_compile_action crate_info = rust_common.create_crate_info(**crate_info_dict) build_metadata = None 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 3100cd1850..7a3bca6012 100644 --- a/test/unit/consistent_crate_name/with_modified_crate_name.bzl +++ b/test/unit/consistent_crate_name/with_modified_crate_name.bzl @@ -1,7 +1,5 @@ """A custom rule that threats all its dependencies as direct dependencies.""" -load("//rust:defs.bzl", "rust_common") - # buildifier: disable=bzl-visibility load("//rust/private:providers.bzl", "BuildInfo", "CrateInfo", "DepInfo", "DepVariantInfo") diff --git a/test/unit/force_all_deps_direct/generator.bzl b/test/unit/force_all_deps_direct/generator.bzl index 484ed09729..959687c6b6 100644 --- a/test/unit/force_all_deps_direct/generator.bzl +++ b/test/unit/force_all_deps_direct/generator.bzl @@ -1,8 +1,5 @@ """A custom rule that threats all its dependencies as direct dependencies.""" -# buildifier: disable=bzl-visibility -load("//rust/private:common.bzl", "rust_common") - # buildifier: disable=bzl-visibility load("//rust/private:providers.bzl", "BuildInfo", "CrateInfo", "DepInfo", "DepVariantInfo") diff --git a/test/unit/pipelined_compilation/wrap.bzl b/test/unit/pipelined_compilation/wrap.bzl index f987485006..7ceef1c021 100644 --- a/test/unit/pipelined_compilation/wrap.bzl +++ b/test/unit/pipelined_compilation/wrap.bzl @@ -1,8 +1,5 @@ """A custom rule that wraps a crate called to_wrap.""" -# buildifier: disable=bzl-visibility -load("//rust/private:common.bzl", "rust_common") - # buildifier: disable=bzl-visibility load("//rust/private:providers.bzl", "BuildInfo", "CrateInfo", "DepInfo", "DepVariantInfo")