Skip to content

Commit

Permalink
Auto merge of rust-lang#48642 - alexcrichton:compile-cargo-once, r=mi…
Browse files Browse the repository at this point in the history
…chaelwoerister

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!
  • Loading branch information
bors committed Mar 6, 2018
2 parents 2789b06 + 87f3dda commit 4cdbac6
Show file tree
Hide file tree
Showing 9 changed files with 92 additions and 23 deletions.
82 changes: 64 additions & 18 deletions src/Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/librustc_driver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["dylib"]
arena = { path = "../libarena" }
graphviz = { path = "../libgraphviz" }
log = "0.4"
env_logger = { version = "0.4", default-features = false }
env_logger = { version = "0.5", default-features = false }
rustc = { path = "../librustc" }
rustc_allocator = { path = "../librustc_allocator" }
rustc_back = { path = "../librustc_back" }
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ pub fn diagnostics_registry() -> errors::registry::Registry {
}

pub fn main() {
env_logger::init().unwrap();
env_logger::init();
let result = run(|| {
let args = env::args_os().enumerate()
.map(|(i, arg)| arg.into_string().unwrap_or_else(|arg| {
Expand Down
4 changes: 4 additions & 0 deletions src/librustc_trans/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ syntax = { path = "../libsyntax" }
syntax_pos = { path = "../libsyntax_pos" }
tempdir = "0.3"

# not actually used but needed to make sure we enable the same feature set as
# winapi used in librustc
env_logger = { version = "0.5", default-features = false }

[features]
# Used to communicate the feature to `rustc_back` in the same manner that the
# `rustc` driver script communicate this.
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ struct Output {

pub fn main() {
const STACK_SIZE: usize = 32_000_000; // 32MB
env_logger::init().unwrap();
env_logger::init();
let res = std::thread::Builder::new().stack_size(STACK_SIZE).spawn(move || {
get_args().map(|args| main_args(&args)).unwrap_or(1)
}).unwrap().join().unwrap_or(101);
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.0.0"

[dependencies]
diff = "0.1.10"
env_logger = { version = "0.4", default-features = false }
env_logger = { version = "0.5", default-features = false }
filetime = "0.1"
getopts = "0.2"
log = "0.4"
Expand Down
2 changes: 1 addition & 1 deletion src/tools/compiletest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ mod raise_fd_limit;
mod read2;

fn main() {
env_logger::init().unwrap();
env_logger::init();

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

Expand Down
2 changes: 2 additions & 0 deletions src/tools/linkchecker/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ fn check(cache: &mut Cache,
file.ends_with("util/struct.ThinVec.html") ||
file.ends_with("util/struct.RcSlice.html") ||
file.ends_with("layout/struct.TyLayout.html") ||
file.ends_with("humantime/struct.Timestamp.html") ||
file.ends_with("log/index.html") ||
file.ends_with("ty/struct.Slice.html") ||
file.ends_with("ty/enum.Attributes.html") ||
file.ends_with("ty/struct.SymbolName.html") {
Expand Down
17 changes: 17 additions & 0 deletions src/tools/tidy/src/deps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ static WHITELIST_CRATES: &'static [CrateVersion] = &[

/// Whitelist of crates rustc is allowed to depend on. Avoid adding to the list if possible.
static WHITELIST: &'static [Crate] = &[
Crate("aho-corasick"),
Crate("ar"),
Crate("atty"),
Crate("backtrace"),
Crate("backtrace-sys"),
Crate("bitflags"),
Expand All @@ -65,32 +67,47 @@ static WHITELIST: &'static [Crate] = &[
Crate("cfg-if"),
Crate("cmake"),
Crate("ena"),
Crate("env_logger"),
Crate("filetime"),
Crate("flate2"),
Crate("fuchsia-zircon"),
Crate("fuchsia-zircon-sys"),
Crate("humantime"),
Crate("jobserver"),
Crate("kernel32-sys"),
Crate("lazy_static"),
Crate("libc"),
Crate("log"),
Crate("log_settings"),
Crate("memchr"),
Crate("miniz-sys"),
Crate("num_cpus"),
Crate("owning_ref"),
Crate("parking_lot"),
Crate("parking_lot_core"),
Crate("quick-error"),
Crate("rand"),
Crate("redox_syscall"),
Crate("redox_termios"),
Crate("regex"),
Crate("regex-syntax"),
Crate("rustc-demangle"),
Crate("smallvec"),
Crate("stable_deref_trait"),
Crate("tempdir"),
Crate("termcolor"),
Crate("terminon"),
Crate("termion"),
Crate("thread_local"),
Crate("unicode-width"),
Crate("unreachable"),
Crate("utf8-ranges"),
Crate("void"),
Crate("winapi"),
Crate("winapi-build"),
Crate("winapi-i686-pc-windows-gnu"),
Crate("winapi-x86_64-pc-windows-gnu"),
Crate("wincolor"),
];

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

0 comments on commit 4cdbac6

Please sign in to comment.