Relm4 icon indicating copy to clipboard operation
Relm4 copied to clipboard

Improve the warning/error message, `expected identifier` to correctly identify the issue

Open adhadse opened this issue 1 year ago • 3 comments

Adding extra , at the end of a widget written inside a view macro generates this vague warning and error: image Removing the extra comma make it go away: image

Other times, I came across this when trying to add a named child to GtkStack: image Which should be resolved using a ::

image

What can be done to improve the user to understand the underlying problem neatly?

adhadse avatar Jun 11 '23 14:06 adhadse

Thanks for your report! Does this issue still appear in 0.6?

Also, the last error is valid though, no?

AaronErhardt avatar Jun 11 '23 14:06 AaronErhardt

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 🤔

adhadse avatar Jun 12 '23 01:06 adhadse

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 =.

AaronErhardt avatar Jun 12 '23 21:06 AaronErhardt