Skip to main content

Module typify_probe

Module typify_probe 

Source
Expand description

Runs typify::TypeSpace::add_root_schema against a candidate schema inside catch_unwind, classifying the outcome so bisect can distinguish “converts fine”, “panics with the known typify-0.7.0 merge.rs:427 shape”, and “something else entirely” (a different panic, or an ordinary Result::Err).

Enums§

ProbeOutcome

Functions§

panic_message 🔒
probe
Runs typify against schema (a full combined-schema JSON document, the same shape build.rs feeds it) inside catch_unwind, classifying the result. Temporarily installs a panic hook to capture the panic location (the payload alone doesn’t carry it), always restoring the previous hook before returning - there is no early return between install and restore, so this stays paired even on the panicking path. Serialized process-wide via probe_lock - see its docs.
probe_lock 🔒
Process-wide lock serializing every probe() call. std::panic::set_hook / take_hook are global, process-wide state, not thread-local - without this, two probe() calls running on different threads at once (e.g. cargo test’s default parallel test execution) can install/restore each other’s hooks out of order and corrupt the captured panic location. The bisection driver in bisect.rs only ever calls probe() sequentially on one thread anyway, so this lock is uncontended in normal use; it exists purely to make probe() itself safe to call concurrently.