typestate-rs icon indicating copy to clipboard operation
typestate-rs copied to clipboard

The macro should be able to export diagrams even if the state machine fails verification

Open jmg-duarte opened this issue 2 years ago • 1 comments

Having the machine export diagrams is a feature useful as documentation but also as a debugging tool. Allowing the macro to export diagrams before verification would help debugging

jmg-duarte avatar Nov 15 '21 19:11 jmg-duarte

The problem starts here: https://github.com/rustype/typestate-rs/blob/9799ae1bccf46ef5039709d7b411833304491e88/typestate-proc-macro/src/lib.rs#L75-L91 While bailing early is useful to avoid processing malformed state machines, we still want to able to look at them, hence we must build them regardless and only run validations in the end.

jmg-duarte avatar Nov 23 '21 21:11 jmg-duarte