-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Right now Command::check() returns a bool. This is simple, but makes it hard to debug when something fallible happens inside a check (e.g. lock acquisition, DB access).
Normally check() should avoid side effects — but we can't enforce that at the type level in Rust. We're not in Haskell. Implementers may do I/O or locking, and panics or silent failures can short-circuit the test run with no explanation.
We're considering switching to:
fn check(&self, state: &S) -> Result<bool, E>;This would let the runner surface useful diagnostics without panicking or swallowing errors. We could start with E = &'static str or Box<dyn std::error::Error>.
Not settled yet — opening this for discussion. Credit to @cylewitruk for raising the point.
BowTiedRadone
Metadata
Metadata
Assignees
Labels
No labels