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
Build state function with non-Clone
state results in suboptimal compiler error
#263
Comments
This repo is set up to triage issues with Tribble, but this issue couldn't be processed. If you deliberately didn't use Tribble to report this issue, you can safely ignore this warning. If you did, something's gone wrong here. |
Not sure how this could be made into a nicer error at the compiler level, but the CLI could certainly do some parsing and provide suggestions. |
CLI error inference will be implemented after v0.4.0 goes stable. |
(Filing manually because the compiler error is too long for Tribble, see arctic-hen7/tribble#4)
I'm not sure how fixable this is, but I spent longer than I'd prefer to admit banging my head against the compiler error resulting from (simplified):
This fails to compile with:
The error message does not mention any constraints on
S
, so I incorrectly assumed the problem was with the conversion from my error type toBlamedError
.In Perseus's defense it does document that build state should be
Clone
, and once you switch fromview()
toview_with_unreactive_state()
you get a better error message. But I was changing my mind between global state (documented as not needing to beClone
) and build state, and hadn't gotten as far as changing my view function before running into this.The text was updated successfully, but these errors were encountered: