compiletest: drop dependency on anyhow
Currently `compiletest` panics all over the place but doesn't really use `anyhow` anyway. I'd like to introduce some more principled error handling and disciplined diagnostic reporting in the near future.
This commit is contained in:
parent
3dec37f1cc
commit
603685cd74
3 changed files with 5 additions and 8 deletions
|
@ -676,7 +676,6 @@ name = "compiletest"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstyle-svg",
|
"anstyle-svg",
|
||||||
"anyhow",
|
|
||||||
"build_helper",
|
"build_helper",
|
||||||
"colored",
|
"colored",
|
||||||
"diff",
|
"diff",
|
||||||
|
|
|
@ -9,7 +9,6 @@ doctest = false
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# tidy-alphabetical-start
|
# tidy-alphabetical-start
|
||||||
anstyle-svg = "0.1.3"
|
anstyle-svg = "0.1.3"
|
||||||
anyhow = "1"
|
|
||||||
build_helper = { path = "../../build_helper" }
|
build_helper = { path = "../../build_helper" }
|
||||||
colored = "2"
|
colored = "2"
|
||||||
diff = "0.1.10"
|
diff = "0.1.10"
|
||||||
|
|
|
@ -10,7 +10,6 @@ use std::process::{Child, Command, ExitStatus, Output, Stdio};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::{env, iter, str};
|
use std::{env, iter, str};
|
||||||
|
|
||||||
use anyhow::Context;
|
|
||||||
use colored::Colorize;
|
use colored::Colorize;
|
||||||
use regex::{Captures, Regex};
|
use regex::{Captures, Regex};
|
||||||
use tracing::*;
|
use tracing::*;
|
||||||
|
@ -143,11 +142,11 @@ pub fn run(config: Arc<Config>, testpaths: &TestPaths, revision: Option<&str>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
let cx = TestCx { config: &config, props: &props, testpaths, revision };
|
||||||
create_dir_all(&cx.output_base_dir())
|
|
||||||
.with_context(|| {
|
if let Err(e) = create_dir_all(&cx.output_base_dir()) {
|
||||||
format!("failed to create output base directory {}", cx.output_base_dir().display())
|
panic!("failed to create output base directory {}: {e}", cx.output_base_dir().display());
|
||||||
})
|
}
|
||||||
.unwrap();
|
|
||||||
if props.incremental {
|
if props.incremental {
|
||||||
cx.init_incremental_test();
|
cx.init_incremental_test();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue