Skip to content
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
9 changes: 6 additions & 3 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1424,11 +1424,12 @@ def rustc_compile_action(
env = env,
arguments = args.all,
mnemonic = "Rustc",
progress_message = "Compiling Rust {} {}{} ({} files)".format(
progress_message = "Compiling Rust {} {}{} ({} file{})".format(
crate_info.type,
ctx.label.name,
formatted_version,
len(srcs),
"" if len(srcs) == 1 else "s",
),
toolchain = "@rules_rust//rust:toolchain_type",
resource_set = get_rustc_resource_set(toolchain),
Expand All @@ -1441,11 +1442,12 @@ def rustc_compile_action(
env = env,
arguments = args_metadata.all,
mnemonic = "RustcMetadata",
progress_message = "Compiling Rust metadata {} {}{} ({} files)".format(
progress_message = "Compiling Rust metadata {} {}{} ({} file{})".format(
crate_info.type,
ctx.label.name,
formatted_version,
len(srcs),
"" if len(srcs) == 1 else "s",
),
toolchain = "@rules_rust//rust:toolchain_type",
)
Expand All @@ -1460,11 +1462,12 @@ def rustc_compile_action(
env = env,
arguments = [args.rustc_path, args.rustc_flags],
mnemonic = "Rustc",
progress_message = "Compiling Rust (without process_wrapper) {} {}{} ({} files)".format(
progress_message = "Compiling Rust (without process_wrapper) {} {}{} ({} file{})".format(
crate_info.type,
ctx.label.name,
formatted_version,
len(srcs),
"" if len(srcs) == 1 else "s",
),
toolchain = "@rules_rust//rust:toolchain_type",
resource_set = get_rustc_resource_set(toolchain),
Expand Down
8 changes: 4 additions & 4 deletions test/unit/is_proc_macro_dep/is_proc_macro_dep_test.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ is_proc_macro_dep_is_not_in_env_for_top_level_action_test = analysistest.make(_i
def _is_proc_macro_dep_is_false_for_proc_macro(ctx):
env = analysistest.begin(ctx)
tut = analysistest.target_under_test(env)
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust proc-macro proc_macro_crate (1 files)'"][0]
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust proc-macro proc_macro_crate (1 file)'"][0]
asserts.equals(env, proc_macro_dep_action.env["BAZEL_RULES_RUST_IS_PROC_MACRO_DEP"], "0")
return analysistest.end(env)

Expand All @@ -74,7 +74,7 @@ is_proc_macro_dep_is_false_for_proc_macro_test = analysistest.make(_is_proc_macr
def _is_proc_macro_dep_is_false_for_top_level_library(ctx):
env = analysistest.begin(ctx)
tut = analysistest.target_under_test(env)
top_level_library_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib top_level_library (1 files)'"][0]
top_level_library_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib top_level_library (1 file)'"][0]
asserts.equals(env, top_level_library_action.env["BAZEL_RULES_RUST_IS_PROC_MACRO_DEP"], "0")
return analysistest.end(env)

Expand All @@ -83,7 +83,7 @@ is_proc_macro_dep_is_false_for_top_level_library_test = analysistest.make(_is_pr
def _is_proc_macro_dep_is_true_for_proc_macro_dep(ctx):
env = analysistest.begin(ctx)
tut = analysistest.target_under_test(env)
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib proc_macro_dep (1 files)'"][0]
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib proc_macro_dep (1 file)'"][0]
asserts.equals(env, proc_macro_dep_action.env["BAZEL_RULES_RUST_IS_PROC_MACRO_DEP"], "1")
return analysistest.end(env)

Expand All @@ -92,7 +92,7 @@ is_proc_macro_dep_is_true_for_proc_macro_dep_test = analysistest.make(_is_proc_m
def _is_proc_macro_dep_is_not_in_env_for_proc_macro_dep(ctx):
env = analysistest.begin(ctx)
tut = analysistest.target_under_test(env)
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib proc_macro_dep (1 files)'"][0]
proc_macro_dep_action = [a for a in tut[DepActionsInfo].actions if str(a) == "action 'Compiling Rust rlib proc_macro_dep (1 file)'"][0]
asserts.true(env, "BAZEL_RULES_RUST_IS_PROC_MACRO_DEP" not in proc_macro_dep_action.env)
return analysistest.end(env)

Expand Down