Skip to content

Commit 31900b4

Browse files
authoredApr 2, 2024
Rollup merge of rust-lang#123378 - ferrocene:hoverbear/bump-sysinfo-to-0.30.8, r=Nilstrieb
Update sysinfo to 0.30.8 Fixes a Mac specific issue when using `metrics = true` in `config.toml`. ```config.toml # Collect information and statistics about the current build and writes it to # disk. Enabling this or not has no impact on the resulting build output. The # schema of the file generated by the build metrics feature is unstable, and # this is not intended to be used during local development. metrics = true ``` During repeated builds, as the generated `metrics.json` grew, eventually `refresh_cpu()` would be called in quick enough succession (specifically: under 200ms) that a divide by zero would occur, leading to a `NaN` which would not be serialized, then when the `metrics.json` was re-read it would fail to parse. That error looks like this (collected from Ferrocene's CI): ``` Compiling rustdoc-tool v0.0.0 (/Users/distiller/project/src/tools/rustdoc) Finished release [optimized] target(s) in 38.37s thread 'main' panicked at src/utils/metrics.rs:180:21: serde_json::from_slice::<JsonRoot>(&contents) failed with invalid type: null, expected f64 at line 1 column 9598 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Build completed unsuccessfully in 0:00:40 Exited with code exit status 1 ``` Related: GuillaumeGomez/sysinfo#1236
2 parents 8e271d7 + b626f01 commit 31900b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -5370,9 +5370,9 @@ dependencies = [
53705370

53715371
[[package]]
53725372
name = "sysinfo"
5373-
version = "0.30.7"
5373+
version = "0.30.8"
53745374
source = "registry+https://github.com/rust-lang/crates.io-index"
5375-
checksum = "0c385888ef380a852a16209afc8cfad22795dd8873d69c9a14d2e2088f118d18"
5375+
checksum = "4b1a378e48fb3ce3a5cf04359c456c9c98ff689bcf1c1bc6e6a31f247686f275"
53765376
dependencies = [
53775377
"cfg-if",
53785378
"core-foundation-sys",

0 commit comments

Comments
 (0)