Skip to content

Commit 34628b6

Browse files
committed
Rename debug target to dev in build output
This renames the debug target to dev in the build output for non-release builds. This includes the output of commands such as `cargo build`, `cargo test`, and `cargo doc`. Closes #3519
1 parent 6dd4ff0 commit 34628b6

28 files changed

+243
-243
lines changed

src/cargo/ops/cargo_rustc/job_queue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl<'a> JobQueue<'a> {
197197
}
198198
}
199199

200-
let build_type = if self.is_release { "release" } else { "debug" };
200+
let build_type = if self.is_release { "release" } else { "dev" };
201201
let profile = cx.lib_profile();
202202
let mut opt_type = String::from(if profile.opt_level == "0" { "unoptimized" }
203203
else { "optimized" });

tests/bad-config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ fn unused_keys() {
575575
execs().with_status(0).with_stderr("\
576576
warning: unused manifest key: target.foo.bar
577577
[COMPILING] foo v0.1.0 (file:///[..])
578-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
578+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
579579
"));
580580
}
581581

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

tests/bench.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,7 @@ fn test_a_bench() {
919919
execs().with_status(0)
920920
.with_stderr("\
921921
[COMPILING] foo v0.1.0 ([..])
922-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
922+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
923923
[RUNNING] target[/]debug[/]deps[/]b-[..][EXE]")
924924
.with_stdout("
925925
running 1 test

tests/build-lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ fn verbose_output_for_lib(p: &ProjectBuilder) -> String {
1212
-C metadata=[..] \
1313
--out-dir [..] \
1414
-L dependency={dir}[/]target[/]debug[/]deps`
15-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
15+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
1616
",
1717
dir = p.root().display(), url = p.url(),
1818
name = "foo", version = "0.0.1")

tests/build-script.rs

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ fn overrides_and_links() {
307307
[..]
308308
[..]
309309
[RUNNING] `rustc --crate-name foo [..] -L foo -L bar[..]`
310-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
310+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
311311
"));
312312
}
313313

@@ -409,7 +409,7 @@ fn only_rerun_build_script() {
409409
[COMPILING] foo v0.5.0 (file://[..])
410410
[RUNNING] `[..][/]build-script-build`
411411
[RUNNING] `rustc --crate-name foo [..]`
412-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
412+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
413413
"));
414414
}
415415

@@ -498,7 +498,7 @@ fn testing_and_such() {
498498
[RUNNING] `[..][/]build-script-build`
499499
[RUNNING] `rustc --crate-name foo [..]`
500500
[RUNNING] `rustc --crate-name foo [..]`
501-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
501+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
502502
[RUNNING] `[..][/]foo-[..][EXE]`
503503
[DOCTEST] foo
504504
[RUNNING] `rustdoc --test [..]`")
@@ -529,7 +529,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
529529
execs().with_status(0)
530530
.with_stderr("\
531531
[COMPILING] foo v0.5.0 (file://[..])
532-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
532+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
533533
[RUNNING] `target[/]debug[/]foo[EXE]`
534534
"));
535535
}
@@ -676,7 +676,7 @@ fn build_deps_simple() {
676676
[RUNNING] `rustc [..] build.rs [..] --extern a=[..]`
677677
[RUNNING] `[..][/]foo-[..][/]build-script-build`
678678
[RUNNING] `rustc --crate-name foo [..]`
679-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
679+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
680680
"));
681681
}
682682

@@ -782,7 +782,7 @@ fn build_cmd_with_a_build_cmd() {
782782
-C metadata=[..] \
783783
--out-dir [..] \
784784
-L [..]target[/]debug[/]deps`
785-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
785+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
786786
"));
787787
}
788788

@@ -929,7 +929,7 @@ fn code_generation() {
929929
execs().with_status(0)
930930
.with_stderr("\
931931
[COMPILING] foo v0.5.0 (file://[..])
932-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
932+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
933933
[RUNNING] `target[/]debug[/]foo`")
934934
.with_stdout("\
935935
Hello, World!
@@ -1373,7 +1373,7 @@ fn cfg_test() {
13731373
[RUNNING] [..] --cfg foo[..]
13741374
[RUNNING] [..] --cfg foo[..]
13751375
[RUNNING] [..] --cfg foo[..]
1376-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1376+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
13771377
[RUNNING] `[..][/]foo-[..][EXE]`
13781378
[RUNNING] `[..][/]test-[..][EXE]`
13791379
[DOCTEST] foo
@@ -1490,7 +1490,7 @@ fn cfg_override_test() {
14901490
[RUNNING] `[..]`
14911491
[RUNNING] `[..]`
14921492
[RUNNING] `[..]`
1493-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1493+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
14941494
[RUNNING] `[..][/]foo-[..][EXE]`
14951495
[RUNNING] `[..][/]test-[..][EXE]`
14961496
[DOCTEST] foo
@@ -1610,7 +1610,7 @@ fn flags_go_into_tests() {
16101610
[COMPILING] foo v0.5.0 ([..]
16111611
[RUNNING] `rustc [..] src[/]lib.rs [..] -L test[..]`
16121612
[RUNNING] `rustc [..] tests[/]foo.rs [..] -L test[..]`
1613-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1613+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
16141614
[RUNNING] `[..][/]foo-[..][EXE]`")
16151615
.with_stdout("
16161616
running 0 tests
@@ -1625,7 +1625,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
16251625
[FRESH] a v0.5.0 ([..]
16261626
[COMPILING] b v0.5.0 ([..]
16271627
[RUNNING] `rustc [..] b[/]src[/]lib.rs [..] -L test[..]`
1628-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1628+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
16291629
[RUNNING] `[..][/]b-[..][EXE]`")
16301630
.with_stdout("
16311631
running 0 tests
@@ -1695,7 +1695,7 @@ fn diamond_passes_args_only_once() {
16951695
[RUNNING] `rustc [..]`
16961696
[COMPILING] foo v0.5.0 ([..]
16971697
[RUNNING] `[..]rlib -L native=test`
1698-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1698+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
16991699
"));
17001700
}
17011701

@@ -1725,7 +1725,7 @@ fn adding_an_override_invalidates() {
17251725
[RUNNING] `rustc [..]`
17261726
[RUNNING] `[..]`
17271727
[RUNNING] `rustc [..] -L native=foo`
1728-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
1728+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
17291729
"));
17301730

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

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

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

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

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

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

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

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

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

@@ -2078,7 +2078,7 @@ fn warnings_emitted() {
20782078
warning: foo
20792079
warning: bar
20802080
[RUNNING] `rustc [..]`
2081-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
2081+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
20822082
"));
20832083
}
20842084

@@ -2124,7 +2124,7 @@ fn warnings_hidden_for_upstream() {
21242124
[RUNNING] `rustc [..]`
21252125
[COMPILING] foo v0.5.0 ([..])
21262126
[RUNNING] `rustc [..]`
2127-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
2127+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
21282128
"));
21292129
}
21302130

@@ -2172,7 +2172,7 @@ warning: bar
21722172
[RUNNING] `rustc [..]`
21732173
[COMPILING] foo v0.5.0 ([..])
21742174
[RUNNING] `rustc [..]`
2175-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
2175+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
21762176
"));
21772177
}
21782178

@@ -2207,7 +2207,7 @@ stdout
22072207
[RUNNING] `[..]`
22082208
stderr
22092209
[RUNNING] `rustc [..]`
2210-
[FINISHED] debug [unoptimized + debuginfo] target(s) in [..]
2210+
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
22112211
"));
22122212
}
22132213

0 commit comments

Comments
 (0)