antoyo / relm

Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust
MIT License
2.43k stars 78 forks source link

parse() Widget: ParseError(None) #91

Closed sanpii closed 6 years ago

sanpii commented 6 years ago

I tried to update relm to 0.12 but I have an error:

   Compiling effitask v0.1.0 (file:///home/sanpi/projects/rust/effitask)
thread 'rustc' panicked at 'parse() Widget: ParseError(None)', libcore/result.rs:945:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: custom attribute panicked
   --> src/edit.rs:137:1
    |
137 | #[widget]
    | ^^^^^^^^^
    |
    = help: message: parse() Widget: ParseError(None)

error: Could not compile `effitask`.

To learn more, run the command again with --verbose.

https://github.com/sanpii/effitask/blob/master/src/edit.rs#L137

antoyo commented 6 years ago

I think you found a bug in the new parser because I can't find an mistake at first glance. Let me some time to check what's wrong. Also, I need to improve the error messages of the parser.

antoyo commented 6 years ago

Oh, I see, you're actually using a syntax that was never intended to be working :) . This line should not contain the prefix. It should be:

Calendar("Created".to_owned()),

I'm actually surprised this syntax used to work.

So the rule is that qualified path (module::Widget) are for gtk widgets and unqualified path (Widget) are for relm widget.

sanpii commented 6 years ago

Thank you.