Skip to content

Rename debug target to dev in build output #3533

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

Merged
merged 1 commit into from
Jan 12, 2017
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
2 changes: 1 addition & 1 deletion src/cargo/ops/cargo_rustc/job_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<'a> JobQueue<'a> {
}
}

let build_type = if self.is_release { "release" } else { "debug" };
let build_type = if self.is_release { "release" } else { "dev" };
let profile = cx.lib_profile();
let mut opt_type = String::from(if profile.opt_level == "0" { "unoptimized" }
else { "optimized" });
Expand Down
4 changes: 2 additions & 2 deletions tests/bad-config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ fn unused_keys() {
execs().with_status(0).with_stderr("\
warning: unused manifest key: target.foo.bar
[COMPILING] foo v0.1.0 (file:///[..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -626,7 +626,7 @@ invalid), but this file has a table header which does not have a newline after
it. A newline needs to be added and this warning will soon become a hard error
in the future.
[COMPILING] empty_deps v0.0.0 ([..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down
2 changes: 1 addition & 1 deletion tests/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ fn test_a_bench() {
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.1.0 ([..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] target[/]debug[/]deps[/]b-[..][EXE]")
.with_stdout("
running 1 test
Expand Down
2 changes: 1 addition & 1 deletion tests/build-lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn verbose_output_for_lib(p: &ProjectBuilder) -> String {
-C metadata=[..] \
--out-dir [..] \
-L dependency={dir}[/]target[/]debug[/]deps`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
dir = p.root().display(), url = p.url(),
name = "foo", version = "0.0.1")
Expand Down
52 changes: 26 additions & 26 deletions tests/build-script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ fn overrides_and_links() {
[..]
[..]
[RUNNING] `rustc --crate-name foo [..] -L foo -L bar[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -409,7 +409,7 @@ fn only_rerun_build_script() {
[COMPILING] foo v0.5.0 (file://[..])
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc --crate-name foo [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -498,7 +498,7 @@ fn testing_and_such() {
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc --crate-name foo [..]`
[RUNNING] `rustc --crate-name foo [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..][/]foo-[..][EXE]`
[DOCTEST] foo
[RUNNING] `rustdoc --test [..]`")
Expand Down Expand Up @@ -529,7 +529,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.5.0 (file://[..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[/]debug[/]foo[EXE]`
"));
}
Expand Down Expand Up @@ -676,7 +676,7 @@ fn build_deps_simple() {
[RUNNING] `rustc [..] build.rs [..] --extern a=[..]`
[RUNNING] `[..][/]foo-[..][/]build-script-build`
[RUNNING] `rustc --crate-name foo [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -782,7 +782,7 @@ fn build_cmd_with_a_build_cmd() {
-C metadata=[..] \
--out-dir [..] \
-L [..]target[/]debug[/]deps`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -929,7 +929,7 @@ fn code_generation() {
execs().with_status(0)
.with_stderr("\
[COMPILING] foo v0.5.0 (file://[..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `target[/]debug[/]foo`")
.with_stdout("\
Hello, World!
Expand Down Expand Up @@ -1373,7 +1373,7 @@ fn cfg_test() {
[RUNNING] [..] --cfg foo[..]
[RUNNING] [..] --cfg foo[..]
[RUNNING] [..] --cfg foo[..]
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..][/]foo-[..][EXE]`
[RUNNING] `[..][/]test-[..][EXE]`
[DOCTEST] foo
Expand Down Expand Up @@ -1490,7 +1490,7 @@ fn cfg_override_test() {
[RUNNING] `[..]`
[RUNNING] `[..]`
[RUNNING] `[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..][/]foo-[..][EXE]`
[RUNNING] `[..][/]test-[..][EXE]`
[DOCTEST] foo
Expand Down Expand Up @@ -1610,7 +1610,7 @@ fn flags_go_into_tests() {
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] src[/]lib.rs [..] -L test[..]`
[RUNNING] `rustc [..] tests[/]foo.rs [..] -L test[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..][/]foo-[..][EXE]`")
.with_stdout("
running 0 tests
Expand All @@ -1625,7 +1625,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
[FRESH] a v0.5.0 ([..]
[COMPILING] b v0.5.0 ([..]
[RUNNING] `rustc [..] b[/]src[/]lib.rs [..] -L test[..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
[RUNNING] `[..][/]b-[..][EXE]`")
.with_stdout("
running 0 tests
Expand Down Expand Up @@ -1695,7 +1695,7 @@ fn diamond_passes_args_only_once() {
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `[..]rlib -L native=test`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -1725,7 +1725,7 @@ fn adding_an_override_invalidates() {
[RUNNING] `rustc [..]`
[RUNNING] `[..]`
[RUNNING] `rustc [..] -L native=foo`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

File::create(p.root().join(".cargo/config")).unwrap().write_all(format!("
Expand All @@ -1737,7 +1737,7 @@ fn adding_an_override_invalidates() {
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=bar`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand All @@ -1764,7 +1764,7 @@ fn changing_an_override_invalidates() {
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=foo`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

File::create(p.root().join(".cargo/config")).unwrap().write_all(format!("
Expand All @@ -1776,7 +1776,7 @@ fn changing_an_override_invalidates() {
execs().with_status(0).with_stderr("\
[COMPILING] foo v0.5.0 ([..]
[RUNNING] `rustc [..] -L native=bar`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -1809,7 +1809,7 @@ fn rebuild_only_on_explicit_paths() {
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc [..] src[/]lib.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

sleep_ms(1000);
Expand All @@ -1823,14 +1823,14 @@ fn rebuild_only_on_explicit_paths() {
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc [..] src[/]lib.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

println!("run with2");
assert_that(p.cargo("build").arg("-v"),
execs().with_status(0).with_stderr("\
[FRESH] a v0.5.0 ([..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

sleep_ms(1000);
Expand All @@ -1841,7 +1841,7 @@ fn rebuild_only_on_explicit_paths() {
assert_that(p.cargo("build").arg("-v"),
execs().with_status(0).with_stderr("\
[FRESH] a v0.5.0 ([..])
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

// but changing dependent files does
Expand All @@ -1852,7 +1852,7 @@ fn rebuild_only_on_explicit_paths() {
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc [..] src[/]lib.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));

// .. as does deleting a file
Expand All @@ -1863,7 +1863,7 @@ fn rebuild_only_on_explicit_paths() {
[COMPILING] a v0.5.0 ([..])
[RUNNING] `[..][/]build-script-build`
[RUNNING] `rustc [..] src[/]lib.rs [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -2078,7 +2078,7 @@ fn warnings_emitted() {
warning: foo
warning: bar
[RUNNING] `rustc [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -2124,7 +2124,7 @@ fn warnings_hidden_for_upstream() {
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..])
[RUNNING] `rustc [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -2172,7 +2172,7 @@ warning: bar
[RUNNING] `rustc [..]`
[COMPILING] foo v0.5.0 ([..])
[RUNNING] `rustc [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down Expand Up @@ -2207,7 +2207,7 @@ stdout
[RUNNING] `[..]`
stderr
[RUNNING] `rustc [..]`
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
"));
}

Expand Down
Loading