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"
|
||||
dependencies = [
|
||||
"anstyle-svg",
|
||||
"anyhow",
|
||||
"build_helper",
|
||||
"colored",
|
||||
"diff",
|
||||
|
|
|
@ -9,7 +9,6 @@ doctest = false
|
|||
[dependencies]
|
||||
# tidy-alphabetical-start
|
||||
anstyle-svg = "0.1.3"
|
||||
anyhow = "1"
|
||||
build_helper = { path = "../../build_helper" }
|
||||
colored = "2"
|
||||
diff = "0.1.10"
|
||||
|
|
|
@ -10,7 +10,6 @@ use std::process::{Child, Command, ExitStatus, Output, Stdio};
|
|||
use std::sync::Arc;
|
||||
use std::{env, iter, str};
|
||||
|
||||
use anyhow::Context;
|
||||
use colored::Colorize;
|
||||
use regex::{Captures, Regex};
|
||||
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 };
|
||||
create_dir_all(&cx.output_base_dir())
|
||||
.with_context(|| {
|
||||
format!("failed to create output base directory {}", cx.output_base_dir().display())
|
||||
})
|
||||
.unwrap();
|
||||
|
||||
if let Err(e) = create_dir_all(&cx.output_base_dir()) {
|
||||
panic!("failed to create output base directory {}: {e}", cx.output_base_dir().display());
|
||||
}
|
||||
|
||||
if props.incremental {
|
||||
cx.init_incremental_test();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue