Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
bend-n committed May 7, 2024
1 parent 33d1a63 commit bcb71b0
Show file tree
Hide file tree
Showing 49 changed files with 433 additions and 418 deletions.
17 changes: 17 additions & 0 deletions src/cargo/core/compiler/job_queue/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,30 @@ impl<'gctx> DrainState<'gctx> {
// `display_error` inside `handle_error`.
Some(anyhow::Error::new(AlreadyPrintedError::new(error)))
} else if self.queue.is_empty() && self.pending_queue.is_empty() {
<<<<<<< HEAD
<<<<<<< HEAD
<<<<<<< HEAD
let profile_link = build_runner.bcx.gctx.shell().err_hyperlink(
"https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles",
);
let message = format!(
"{profile_link}`{profile_name}` profile [{opt_type}]{profile_link:#} target(s) in {time_elapsed}",
);
if !build_runner.bcx.build_config.build_plan {
=======
let message =
format!("`{profile_name}` profile [{opt_type}] target(s) in {time_elapsed}",);
=======
let message = format!("{profile_name} [{opt_type}] target(s) in {time_elapsed}",);
>>>>>>> parent of e7e8d8748 (fix(compiler): Clarify we're showing a profile name)
=======
let message = format!(
"{} [{}] target(s) in {}",
profile_name, opt_type, time_elapsed
);
>>>>>>> parent of 1906d27cf (refactor(compiler): Use inline string interpolation)
if !cx.bcx.build_config.build_plan {
>>>>>>> parent of 69f38a08d (fix(compiler): Link people to more info about profiles)
// It doesn't really matter if this fails.
let _ = build_runner.bcx.gctx.shell().status("Finished", message);
future_incompat::save_and_display_report(
Expand Down
4 changes: 2 additions & 2 deletions tests/build-std/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ fn basic() {
// There have been multiple bugs where every build triggers and update.
.with_stderr(
"[COMPILING] foo v0.0.1 [..]\n\
[FINISHED] `dev` profile [..]",
[FINISHED] dev [..]",
)
.run();
p.cargo("run").build_std().target_host().run();
Expand Down Expand Up @@ -262,7 +262,7 @@ fn remap_path_scope() {
.with_status(101)
.with_stderr_contains(
"\
[FINISHED] `release` profile [optimized + debuginfo] [..]
[FINISHED] release [optimized + debuginfo] [..]
[RUNNING] [..]
[..]thread '[..]' panicked at [..]src/main.rs:3:[..]",
)
Expand Down
20 changes: 10 additions & 10 deletions tests/testsuite/alt_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn depend_on_alt_registry() {
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand All @@ -51,7 +51,7 @@ fn depend_on_alt_registry() {
"\
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -95,7 +95,7 @@ fn depend_on_alt_registry_depends_on_same_registry_no_index() {
[CHECKING] baz v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -139,7 +139,7 @@ fn depend_on_alt_registry_depends_on_same_registry() {
[CHECKING] baz v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -184,7 +184,7 @@ fn depend_on_alt_registry_depends_on_crates_io() {
[CHECKING] baz v0.0.1
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -220,7 +220,7 @@ fn registry_and_path_dep_works() {
[LOCKING] 2 packages to latest compatible versions
[CHECKING] bar v0.0.1 ([CWD]/bar)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -428,7 +428,7 @@ fn alt_registry_and_crates_io_deps() {
[CHECKING] alt_reg_dep v0.1.0 (registry `alternative`)
[CHECKING] crates_io_dep v0.0.1
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -701,7 +701,7 @@ fn patch_alt_reg() {
[LOCKING] 2 packages to latest compatible versions
[CHECKING] bar v0.1.0 ([CWD]/bar)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
Expand Down Expand Up @@ -796,7 +796,7 @@ fn no_api() {
[DOWNLOADED] bar v0.0.1 (registry `alternative`)
[CHECKING] bar v0.0.1 (registry `alternative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down Expand Up @@ -1359,7 +1359,7 @@ fn registries_index_relative_url() {
[DOWNLOADED] bar v0.0.1 (registry `relative`)
[CHECKING] bar v0.0.1 (registry `relative`)
[CHECKING] foo v0.0.1 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]s
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]s
",
)
.run();
Expand Down
8 changes: 4 additions & 4 deletions tests/testsuite/bad_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@ fn unused_keys() {
"\
warning: unused manifest key: target.foo.bar
[CHECKING] foo v0.1.0 ([CWD])
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
Expand All @@ -711,7 +711,7 @@ warning: unused manifest key: target.foo.bar
"\
warning: unused manifest key: package.bulid
[CHECKING] foo [..]
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
Expand Down Expand Up @@ -739,7 +739,7 @@ warning: unused manifest key: package.bulid
"\
warning: unused manifest key: lib.build
[CHECKING] foo [..]
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
Expand All @@ -764,7 +764,7 @@ fn unused_keys_in_virtual_manifest() {
"\
[WARNING] [..]/foo/Cargo.toml: unused manifest key: workspace.bulid
[CHECKING] bar [..]
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run();
Expand Down
Loading

0 comments on commit bcb71b0

Please sign in to comment.