Skip to content

Commit

Permalink
Auto merge of rust-lang#121448 - klensy:bump-22-02-24, r=clubby789
Browse files Browse the repository at this point in the history
bump few deps

Bumps `sysinfo`, `tabled`; dedupes `env_logger`; drops `is-terminal`
https://github.com/zhiburt/tabled/blob/v0.15.1/CHANGELOG.md
https://github.com/GuillaumeGomez/sysinfo/blob/v0.30.5/CHANGELOG.md
  • Loading branch information
bors committed Feb 23, 2024
2 parents dda102c + 53efefb commit 6dadb6e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 45 deletions.
44 changes: 10 additions & 34 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1224,19 +1224,6 @@ dependencies = [
"regex",
]

[[package]]
name = "env_logger"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
dependencies = [
"humantime",
"is-terminal",
"log",
"regex",
"termcolor",
]

[[package]]
name = "env_logger"
version = "0.11.2"
Expand Down Expand Up @@ -2058,17 +2045,6 @@ version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"

[[package]]
name = "is-terminal"
version = "0.4.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b"
dependencies = [
"hermit-abi",
"libc",
"windows-sys 0.52.0",
]

[[package]]
name = "itertools"
version = "0.11.0"
Expand Down Expand Up @@ -2364,7 +2340,7 @@ dependencies = [
"clap",
"clap_complete",
"elasticlunr-rs",
"env_logger 0.11.2",
"env_logger",
"handlebars",
"log",
"memchr",
Expand Down Expand Up @@ -2709,7 +2685,7 @@ dependencies = [
"camino",
"clap",
"derive_builder",
"env_logger 0.10.2",
"env_logger",
"fs_extra",
"glob",
"humansize",
Expand Down Expand Up @@ -2788,9 +2764,9 @@ dependencies = [

[[package]]
name = "papergrid"
version = "0.10.0"
version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2ccbe15f2b6db62f9a9871642746427e297b0ceb85f9a7f1ee5ff47d184d0c8"
checksum = "9ad43c07024ef767f9160710b3a6773976194758c7919b17e63b863db0bdf7fb"
dependencies = [
"bytecount",
"fnv",
Expand Down Expand Up @@ -3326,7 +3302,7 @@ name = "rustbook"
version = "0.1.0"
dependencies = [
"clap",
"env_logger 0.10.2",
"env_logger",
"mdbook",
]

Expand Down Expand Up @@ -5270,16 +5246,16 @@ dependencies = [

[[package]]
name = "sysinfo"
version = "0.29.11"
version = "0.30.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd727fc423c2060f6c92d9534cef765c65a6ed3f428a03d7def74a8c4348e666"
checksum = "1fb4f3438c8f6389c864e61221cbc97e9bca98b4daf39a5beb7bea660f528bb2"
dependencies = [
"cfg-if",
"core-foundation-sys",
"libc",
"ntapi",
"once_cell",
"winapi",
"windows",
]

[[package]]
Expand Down Expand Up @@ -5314,9 +5290,9 @@ dependencies = [

[[package]]
name = "tabled"
version = "0.13.0"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d38d39c754ae037a9bc3ca1580a985db7371cd14f1229172d1db9093feb6739"
checksum = "4c998b0c8b921495196a48aabaf1901ff28be0760136e31604f7967b0792050e"
dependencies = [
"papergrid",
"unicode-width",
Expand Down
6 changes: 3 additions & 3 deletions src/tools/opt-dist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ edition = "2021"

[dependencies]
build_helper = { path = "../build_helper" }
env_logger = "0.10"
env_logger = "0.11"
log = "0.4"
anyhow = { version = "1", features = ["backtrace"] }
humantime = "2"
humansize = "2"
sysinfo = { version = "0.29", default-features = false }
sysinfo = { version = "0.30", default-features = false }
fs_extra = "1"
camino = "1"
reqwest = { version = "0.11", features = ["blocking"] }
Expand All @@ -23,4 +23,4 @@ glob = "0.3"
tempfile = "3.5"
derive_builder = "0.20"
clap = { version = "4", features = ["derive"] }
tabled = { version = "0.13", default-features = false, features = ["std"] }
tabled = { version = "0.15", default-features = false, features = ["std"] }
6 changes: 3 additions & 3 deletions src/tools/opt-dist/src/utils/artifact_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::io::Write;

use tabled::builder::Builder;
use tabled::settings::object::Columns;
use tabled::settings::style::{BorderChar, Offset};
use tabled::settings::style::{LineChar, Offset};
use tabled::settings::{Modify, Style};

use crate::environment::Environment;
Expand Down Expand Up @@ -40,19 +40,19 @@ pub fn print_binary_sizes(env: &Environment) -> anyhow::Result<()> {
// Write to GitHub summary
if let Ok(summary_path) = std::env::var("GITHUB_STEP_SUMMARY") {
let mut builder = Builder::default();
builder.push_record(vec!["Artifact", "Size"]);
for (name, size_formatted) in items {
builder.push_record(vec![name, size_formatted]);
}

builder.set_header(vec!["Artifact", "Size"]);
let mut table = builder.build();

let mut file = std::fs::File::options().append(true).create(true).open(summary_path)?;
writeln!(
file,
"# Artifact size\n{}\n",
table.with(Style::markdown()).with(
Modify::new(Columns::single(1)).with(BorderChar::horizontal(':', Offset::End(0))),
Modify::new(Columns::single(1)).with(LineChar::horizontal(':', Offset::End(0))),
)
)?;
}
Expand Down
8 changes: 4 additions & 4 deletions src/tools/opt-dist/src/utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sysinfo::{DiskExt, RefreshKind, System, SystemExt};
use sysinfo::Disks;

use crate::environment::Environment;
use crate::timer::Timer;
Expand All @@ -15,9 +15,9 @@ pub fn format_env_variables() -> String {
}

pub fn print_free_disk_space() -> anyhow::Result<()> {
let sys = System::new_with_specifics(RefreshKind::default().with_disks_list().with_disks());
let available_space: u64 = sys.disks().iter().map(|d| d.available_space()).sum();
let total_space: u64 = sys.disks().iter().map(|d| d.total_space()).sum();
let disks = Disks::new_with_refreshed_list();
let available_space: u64 = disks.list().iter().map(|d| d.available_space()).sum();
let total_space: u64 = disks.list().iter().map(|d| d.total_space()).sum();
let used_space = total_space - available_space;

log::info!(
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rustbook/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"

[dependencies]
clap = "4.0.32"
env_logger = "0.10"
env_logger = "0.11"

[dependencies.mdbook]
version = "0.4.37"
Expand Down

0 comments on commit 6dadb6e

Please sign in to comment.