Relm4
Relm4 copied to clipboard
Improve the warning/error message, `expected identifier` to correctly identify the issue
Adding extra ,
at the end of a widget written inside a view macro generates this vague warning and error:
Removing the extra comma make it go away:
Other times, I came across this when trying to add a named child to GtkStack:
Which should be resolved using a
:
:
What can be done to improve the user to understand the underlying problem neatly?
Thanks for your report! Does this issue still appear in 0.6?
Also, the last error is valid though, no?
Yes, I'm on 0.6.
The last error does confuse me, probably it could be just Did you confuse with =/: ...
warning would have made sense 🤔
I've just merged #470 which fixes the first issue. The second issue needs a little bit more work, but it is not too bad IMO because it makes sense that the macro expects an identifier after a =
.