Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jmg-duarte opened this issue Nov 15, 2021 · 1 comment

Comments

@jmg-duarte
Copy link
Contributor

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
Copy link
Contributor Author

The problem starts here:

bail_if_any!(visitors::state::visit_states(
&mut module,
&mut state_machine_info,
state_constructors_ident,
));
// Visit non-deterministic transitions
bail_if_any!(visitors::decision::visit_non_deterministic(
&mut module,
&mut state_machine_info
));
// Visit transitions
bail_if_any!(visitors::transition::visit_transitions(
&mut module,
&mut state_machine_info
));

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant