Skip to content

Commit 4cdbac6

Browse files
committed
Auto merge of #48642 - alexcrichton:compile-cargo-once, r=michaelwoerister
Update env_logger to 0.5.4 It looks like this cuts down on the number of dependencies in env_logger and notably cuts out a difference between a shared dependency of rls/cargo. My goal here is to ensure that when we compile the RLS/Cargo on CI we only compile Cargo once, and this is one step towards that!
2 parents 2789b06 + 87f3dda commit 4cdbac6

File tree

9 files changed

+92
-23
lines changed

9 files changed

+92
-23
lines changed

src/Cargo.lock

+64-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/librustc_driver/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ crate-type = ["dylib"]
1212
arena = { path = "../libarena" }
1313
graphviz = { path = "../libgraphviz" }
1414
log = "0.4"
15-
env_logger = { version = "0.4", default-features = false }
15+
env_logger = { version = "0.5", default-features = false }
1616
rustc = { path = "../librustc" }
1717
rustc_allocator = { path = "../librustc_allocator" }
1818
rustc_back = { path = "../librustc_back" }

src/librustc_driver/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1577,7 +1577,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
15771577
}
15781578

15791579
pub fn main() {
1580-
env_logger::init().unwrap();
1580+
env_logger::init();
15811581
let result = run(|| {
15821582
let args = env::args_os().enumerate()
15831583
.map(|(i, arg)| arg.into_string().unwrap_or_else(|arg| {

src/librustc_trans/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ syntax = { path = "../libsyntax" }
3535
syntax_pos = { path = "../libsyntax_pos" }
3636
tempdir = "0.3"
3737

38+
# not actually used but needed to make sure we enable the same feature set as
39+
# winapi used in librustc
40+
env_logger = { version = "0.5", default-features = false }
41+
3842
[features]
3943
# Used to communicate the feature to `rustc_back` in the same manner that the
4044
# `rustc` driver script communicate this.

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ struct Output {
100100

101101
pub fn main() {
102102
const STACK_SIZE: usize = 32_000_000; // 32MB
103-
env_logger::init().unwrap();
103+
env_logger::init();
104104
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
105105
get_args().map(|args| main_args(&args)).unwrap_or(1)
106106
}).unwrap().join().unwrap_or(101);

src/tools/compiletest/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ version = "0.0.0"
55

66
[dependencies]
77
diff = "0.1.10"
8-
env_logger = { version = "0.4", default-features = false }
8+
env_logger = { version = "0.5", default-features = false }
99
filetime = "0.1"
1010
getopts = "0.2"
1111
log = "0.4"

src/tools/compiletest/src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mod raise_fd_limit;
5151
mod read2;
5252

5353
fn main() {
54-
env_logger::init().unwrap();
54+
env_logger::init();
5555

5656
let config = parse_config(env::args().collect());
5757

src/tools/linkchecker/main.rs

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ fn check(cache: &mut Cache,
139139
file.ends_with("util/struct.ThinVec.html") ||
140140
file.ends_with("util/struct.RcSlice.html") ||
141141
file.ends_with("layout/struct.TyLayout.html") ||
142+
file.ends_with("humantime/struct.Timestamp.html") ||
143+
file.ends_with("log/index.html") ||
142144
file.ends_with("ty/struct.Slice.html") ||
143145
file.ends_with("ty/enum.Attributes.html") ||
144146
file.ends_with("ty/struct.SymbolName.html") {

src/tools/tidy/src/deps.rs

+17
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ static WHITELIST_CRATES: &'static [CrateVersion] = &[
5656

5757
/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
5858
static WHITELIST: &'static [Crate] = &[
59+
Crate("aho-corasick"),
5960
Crate("ar"),
61+
Crate("atty"),
6062
Crate("backtrace"),
6163
Crate("backtrace-sys"),
6264
Crate("bitflags"),
@@ -65,32 +67,47 @@ static WHITELIST: &'static [Crate] = &[
6567
Crate("cfg-if"),
6668
Crate("cmake"),
6769
Crate("ena"),
70+
Crate("env_logger"),
6871
Crate("filetime"),
6972
Crate("flate2"),
7073
Crate("fuchsia-zircon"),
7174
Crate("fuchsia-zircon-sys"),
75+
Crate("humantime"),
7276
Crate("jobserver"),
7377
Crate("kernel32-sys"),
7478
Crate("lazy_static"),
7579
Crate("libc"),
7680
Crate("log"),
7781
Crate("log_settings"),
82+
Crate("memchr"),
7883
Crate("miniz-sys"),
7984
Crate("num_cpus"),
8085
Crate("owning_ref"),
8186
Crate("parking_lot"),
8287
Crate("parking_lot_core"),
88+
Crate("quick-error"),
8389
Crate("rand"),
8490
Crate("redox_syscall"),
91+
Crate("redox_termios"),
92+
Crate("regex"),
93+
Crate("regex-syntax"),
8594
Crate("rustc-demangle"),
8695
Crate("smallvec"),
8796
Crate("stable_deref_trait"),
8897
Crate("tempdir"),
98+
Crate("termcolor"),
99+
Crate("terminon"),
100+
Crate("termion"),
101+
Crate("thread_local"),
89102
Crate("unicode-width"),
103+
Crate("unreachable"),
104+
Crate("utf8-ranges"),
105+
Crate("void"),
90106
Crate("winapi"),
91107
Crate("winapi-build"),
92108
Crate("winapi-i686-pc-windows-gnu"),
93109
Crate("winapi-x86_64-pc-windows-gnu"),
110+
Crate("wincolor"),
94111
];
95112

96113
// Some types for Serde to deserialize the output of `cargo metadata` to...

0 commit comments

Comments
 (0)