Skip to content

Commit 674e4c2

Browse files
committed
Auto merge of #555 - pietroalbini:deps-update, r=pietroalbini
Update dependencies This PR starts updating the dependencies of Crater, to make it compatible with Rust 1.48.0. A future PR should update the hyper/reqwest/warp dependency block to trim down the number of duplicate dependencies.
2 parents e35e30c + f7e3d67 commit 674e4c2

File tree

9 files changed

+1663
-966
lines changed

9 files changed

+1663
-966
lines changed

Cargo.lock

+1,641-945
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ build = "build.rs"
1313
opt-level = 0
1414

1515
[dependencies]
16-
base64 = "0.10.1"
16+
base64 = "0.13.0"
1717
bytes = "0.4.9"
1818
chrono = { version = "0.4", features = ["serde"] }
19-
chrono-humanize = "0.0.11"
20-
crates-index = "0.12"
19+
chrono-humanize = "0.1.1"
20+
crates-index = "0.16.2"
2121
crossbeam-utils = "0.5"
2222
csv = "1.0.2"
2323
dotenv = "0.13"
@@ -68,11 +68,11 @@ percent-encoding = "2.1.0"
6868
remove_dir_all = "0.5.2"
6969
ctrlc = "3.1.3"
7070
prometheus = "0.7.0"
71-
cargo_metadata = "0.9.1"
71+
cargo_metadata = "0.12.1"
7272
indexmap = "1.4.0"
7373

7474
[dev-dependencies]
75-
assert_cmd = "0.10.1"
75+
assert_cmd = "1.0.2"
7676
difference = "2.0.0"
7777
num_cpus = "1.8.0"
7878
predicates = "1.0.0"

src/agent/api.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use http::{header::AUTHORIZATION, Method, StatusCode};
1010
use reqwest::RequestBuilder;
1111
use serde::de::DeserializeOwned;
1212
use serde_json::json;
13+
use std::error::Error as _;
1314

1415
#[derive(Debug, Fail)]
1516
pub enum AgentApiError {
@@ -100,7 +101,7 @@ impl AgentApi {
100101
let hyper_io = err
101102
.get_ref()
102103
.and_then(|inner| inner.downcast_ref::<::hyper::Error>())
103-
.and_then(|inner| inner.cause2())
104+
.and_then(|inner| inner.source())
104105
.map(|inner| inner.is::<::std::io::Error>())
105106
.unwrap_or(false);
106107
reqwest_io || hyper_io

src/main.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626
env.filter_module("crater", log::LevelFilter::Info);
2727
env.filter_module("rustwide", log::LevelFilter::Info);
2828
if let Ok(content) = std::env::var("RUST_LOG") {
29-
env.parse(&content);
29+
env.parse_filters(&content);
3030
}
3131
rustwide::logging::init_with(env.build());
3232

src/report/display.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ use crate::report::Comparison;
33
use crate::results::{BrokenReason, FailureReason, TestResult};
44

55
pub trait ResultName {
6-
fn name(&self) -> String;
6+
fn short_name(&self) -> String;
77
fn long_name(&self) -> String;
88
}
99

1010
impl ResultName for FailureReason {
11-
fn name(&self) -> String {
11+
fn short_name(&self) -> String {
1212
match self {
1313
FailureReason::Unknown => "failed (unknown)".into(),
1414
FailureReason::Timeout => "timed out".into(),
@@ -25,13 +25,13 @@ impl ResultName for FailureReason {
2525
FailureReason::Unknown
2626
| FailureReason::Timeout
2727
| FailureReason::OOM
28-
| FailureReason::ICE => self.name(),
28+
| FailureReason::ICE => self.short_name(),
2929
}
3030
}
3131
}
3232

3333
impl ResultName for BrokenReason {
34-
fn name(&self) -> String {
34+
fn short_name(&self) -> String {
3535
match self {
3636
BrokenReason::Unknown => "broken crate".into(),
3737
BrokenReason::CargoToml => "broken Cargo.toml".into(),
@@ -41,16 +41,16 @@ impl ResultName for BrokenReason {
4141
}
4242

4343
fn long_name(&self) -> String {
44-
self.name()
44+
self.short_name()
4545
}
4646
}
4747

4848
impl ResultName for TestResult {
49-
fn name(&self) -> String {
49+
fn short_name(&self) -> String {
5050
match self {
51-
TestResult::BrokenCrate(reason) => reason.name(),
52-
TestResult::BuildFail(reason) => format!("build {}", reason.name()),
53-
TestResult::TestFail(reason) => format!("test {}", reason.name()),
51+
TestResult::BrokenCrate(reason) => reason.short_name(),
52+
TestResult::BuildFail(reason) => format!("build {}", reason.short_name()),
53+
TestResult::TestFail(reason) => format!("test {}", reason.short_name()),
5454
TestResult::TestSkipped => "test skipped".into(),
5555
TestResult::TestPass => "test passed".into(),
5656
TestResult::Error => "error".into(),
@@ -66,7 +66,7 @@ impl ResultName for TestResult {
6666
TestResult::TestSkipped
6767
| TestResult::TestPass
6868
| TestResult::Error
69-
| TestResult::Skipped => self.name(),
69+
| TestResult::Skipped => self.short_name(),
7070
}
7171
}
7272
}

src/report/html.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fn write_report<W: ReportWriter>(
119119
.entry(run.res.clone())
120120
.or_insert_with(|| {
121121
result_colors.push(run.res.color());
122-
result_names.push(run.res.name());
122+
result_names.push(run.res.short_name());
123123
result_names.len() - 1
124124
});
125125
runs[pos] = Some(BuildTestResultHTML {

src/report/markdown.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn write_crate(
4040
if !is_child {
4141
run.res.long_name()
4242
} else {
43-
run.res.name()
43+
run.res.short_name()
4444
}
4545
};
4646

src/server/routes/ui/experiments.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ pub fn endpoint_experiment(name: String, data: Arc<Data>) -> Fallible<Response<B
141141
// all CompilerError and DependsOn failures are grouped together
142142
let mut result_counts = HashMap::new();
143143
for (res, count) in ex.get_result_counts(&data.db)? {
144-
*result_counts.entry(res.name()).or_default() += count;
144+
*result_counts.entry(res.short_name()).or_default() += count;
145145
}
146146
let mut result_counts = result_counts.into_iter().collect::<Vec<_>>();
147147
result_counts.sort_by(|v1, v2| (v1.0).cmp(&v2.0));

src/utils/disk_usage.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ impl DiskUsage {
1212
let fs = current_mount()?;
1313
Ok(Self {
1414
mount_point: fs.fs_mounted_on.clone(),
15-
usage: (fs.total.as_usize() - fs.free.as_usize()) as f32 / fs.total.as_usize() as f32,
15+
usage: (fs.total.as_u64() - fs.free.as_u64()) as f32 / fs.total.as_u64() as f32,
1616
})
1717
}
1818

0 commit comments

Comments
 (0)