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

is_valid method in Component trait #11

Open
jonahweissman opened this issue Dec 15, 2021 · 2 comments
Open

is_valid method in Component trait #11

jonahweissman opened this issue Dec 15, 2021 · 2 comments

Comments

@jonahweissman
Copy link
Member

We can separate some concerns and nudge component authors to think more about their state space by requiring a is_valid(State) -> bool method and performing this check before passing any state change requests to components. (This check would normally be performed by components in their changeState implementation.) By breaking this logic out, we can make our "message is well formatted and is about to be acted upon" confirmation reply more meaningful (right now, components can still complain that the message is poorly formatted after the controller has replied with a confirmation).

@dmeliza
Copy link
Member

dmeliza commented Oct 23, 2023

I think this is linked to #10 and can be probably be closed. Will wait for confirmation from @bpqle.

@bpqle
Copy link
Contributor

bpqle commented Oct 23, 2023

The check for validity seems unnecessary, I think.

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

3 participants