I still can't get Dart example to build, though. The compilation complains about a lot of redefinitions and conflicting implementations.
Compilation errors
It seems like some parts of the code are duplicated.
❯ cargo run rid_build
Compiling rid_dart_todo v0.1.0 (/home/life/rustProjects/rid-examples/dart/todo)
error[E0252]: the name `RidStore` is defined multiple times
--> src/app.rs:137:5
|
3 | use rid::RidStore;
| ------------- previous import of the trait `RidStore` here
...
137 | use rid::RidStore;
| ^^^^^^^^^^^^^ `RidStore` reimported here
|
= note: `RidStore` must be defined only once in the type namespace of this module
error: rid::model attribute can only be applied to structs and c-style enums
--> src/app.rs:135:1
|
135 | use std::fmt::Display;
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0428]: the name `__rid_Store_dart_mod` is defined multiple times
--> src/app.rs:146:12
|
12 | pub struct Store {
| ----- previous definition of the module `__rid_Store_dart_mod` here
...
146 | pub struct Store {
| ^^^^^ `__rid_Store_dart_mod` redefined here
|
= note: `__rid_Store_dart_mod` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_mod_rid_rawstore_debug` is defined multiple times
--> src/app.rs:142:1
|
8 | #[rid::store]
| ------------- previous definition of the module `__rid_mod_rid_rawstore_debug` here
...
142 | #[rid::store]
| ^^^^^^^^^^^^^ `__rid_mod_rid_rawstore_debug` redefined here
|
= note: `__rid_mod_rid_rawstore_debug` must be defined only once in the type namespace of this module
= note: this error originates in the attribute macro `rid::store` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `store` is defined multiple times
--> src/app.rs:146:12
|
12 | pub struct Store {
| ----- previous definition of the module `store` here
...
146 | pub struct Store {
| ^^^^^ `store` redefined here
|
= note: `store` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_store_ffi` is defined multiple times
--> src/app.rs:142:1
|
8 | #[rid::store]
| ------------- previous definition of the module `__rid_store_ffi` here
...
142 | #[rid::store]
| ^^^^^^^^^^^^^ `__rid_store_ffi` redefined here
|
= note: `__rid_store_ffi` must be defined only once in the type namespace of this module
= note: this error originates in the attribute macro `rid::store` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `Store_field_wrappers` is defined multiple times
--> src/app.rs:146:12
|
12 | pub struct Store {
| ----- previous definition of the module `Store_field_wrappers` here
...
146 | pub struct Store {
| ^^^^^ `Store_field_wrappers` redefined here
|
= note: `Store_field_wrappers` must be defined only once in the type namespace of this module
error[E0428]: the name `Store` is defined multiple times
--> src/app.rs:146:1
|
12 | pub struct Store {
| ---------------- previous definition of the type `Store` here
...
146 | pub struct Store {
| ^^^^^^^^^^^^^^^^ `Store` redefined here
|
= note: `Store` must be defined only once in the type namespace of this module
error: custom attribute panicked
--> src/app.rs:219:1
|
219 | #[rid::export]
| ^^^^^^^^^^^^^^
|
= help: message: use-after-free in `proc_macro` handle
error[E0428]: the name `__rid_Todo_dart_mod` is defined multiple times
--> src/app.rs:246:12
|
112 | pub struct Todo {
| ---- previous definition of the module `__rid_Todo_dart_mod` here
...
246 | pub struct Todo {
| ^^^^ `__rid_Todo_dart_mod` redefined here
|
= note: `__rid_Todo_dart_mod` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_mod_rid_rawtodo_debug` is defined multiple times
--> src/app.rs:244:1
|
110 | #[rid::model]
| ------------- previous definition of the module `__rid_mod_rid_rawtodo_debug` here
...
244 | #[rid::model]
| ^^^^^^^^^^^^^ `__rid_mod_rid_rawtodo_debug` redefined here
|
= note: `__rid_mod_rid_rawtodo_debug` must be defined only once in the type namespace of this module
= note: this error originates in the attribute macro `rid::model` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `__rid_todo_ffi` is defined multiple times
--> src/app.rs:244:1
|
110 | #[rid::model]
| ------------- previous definition of the module `__rid_todo_ffi` here
...
244 | #[rid::model]
| ^^^^^^^^^^^^^ `__rid_todo_ffi` redefined here
|
= note: `__rid_todo_ffi` must be defined only once in the type namespace of this module
= note: this error originates in the attribute macro `rid::model` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `Todo` is defined multiple times
--> src/app.rs:246:1
|
112 | pub struct Todo {
| --------------- previous definition of the type `Todo` here
...
246 | pub struct Todo {
| ^^^^^^^^^^^^^^^ `Todo` redefined here
|
= note: `Todo` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_mod_rid_rawtodo_display` is defined multiple times
--> src/app.rs:245:44
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ------------ previous definition of the module `__rid_mod_rid_rawtodo_display` here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^^^^^^^^^^^ `__rid_mod_rid_rawtodo_display` redefined here
|
= note: `__rid_mod_rid_rawtodo_display` must be defined only once in the type namespace of this module
= note: this error originates in the derive macro `rid::Display` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `Filter` is defined multiple times
--> src/app.rs:324:1
|
270 | pub enum Filter {
| --------------- previous definition of the type `Filter` here
...
324 | pub enum Filter {
| ^^^^^^^^^^^^^^^ `Filter` redefined here
|
= note: `Filter` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_mod_rid_filter_display` is defined multiple times
--> src/app.rs:323:24
|
269 | #[derive(Clone, Debug, rid::Display)]
| ------------ previous definition of the module `__rid_mod_rid_filter_display` here
...
323 | #[derive(Clone, Debug, rid::Display)]
| ^^^^^^^^^^^^ `__rid_mod_rid_filter_display` redefined here
|
= note: `__rid_mod_rid_filter_display` must be defined only once in the type namespace of this module
= note: this error originates in the derive macro `rid::Display` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `__rid_msg_ffi` is defined multiple times
--> src/app.rs:346:10
|
292 | pub enum Msg {
| --- previous definition of the module `__rid_msg_ffi` here
...
346 | pub enum Msg {
| ^^^ `__rid_msg_ffi` redefined here
|
= note: `__rid_msg_ffi` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_ensuring_Reply_is_defined` is defined multiple times
--> src/app.rs:343:1
|
289 | #[rid::message(Reply)]
| ---------------------- previous definition of the module `__rid_ensuring_Reply_is_defined` here
...
343 | #[rid::message(Reply)]
| ^^^^^^^^^^^^^^^^^^^^^^ `__rid_ensuring_Reply_is_defined` redefined here
|
= note: `__rid_ensuring_Reply_is_defined` must be defined only once in the type namespace of this module
= note: this error originates in the attribute macro `rid::message` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0428]: the name `Msg` is defined multiple times
--> src/app.rs:346:1
|
292 | pub enum Msg {
| ------------ previous definition of the type `Msg` here
...
346 | pub enum Msg {
| ^^^^^^^^^^^^ `Msg` redefined here
|
= note: `Msg` must be defined only once in the type namespace of this module
error[E0428]: the name `Reply` is defined multiple times
--> src/app.rs:364:1
|
310 | pub enum Reply {
| -------------- previous definition of the type `Reply` here
...
364 | pub enum Reply {
| ^^^^^^^^^^^^^^ `Reply` redefined here
|
= note: `Reply` must be defined only once in the type namespace of this module
error[E0428]: the name `__rid_reply_mod` is defined multiple times
--> src/app.rs:364:10
|
310 | pub enum Reply {
| ----- previous definition of the module `__rid_reply_mod` here
...
364 | pub enum Reply {
| ^^^^^ `__rid_reply_mod` redefined here
|
= note: `__rid_reply_mod` must be defined only once in the type namespace of this module
warning: unused import: `rid::RidStore`
--> src/app.rs:137:5
|
137 | use rid::RidStore;
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0119]: conflicting implementations of trait `std::clone::Clone` for type `Filter`
--> src/app.rs:323:10
|
269 | #[derive(Clone, Debug, rid::Display)]
| ----- first implementation here
...
323 | #[derive(Clone, Debug, rid::Display)]
| ^^^^^ conflicting implementation for `Filter`
|
= note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::cmp::PartialEq` for type `Todo`
--> src/app.rs:245:17
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| --------- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^^^^^^^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::cmp::Eq` for type `Todo`
--> src/app.rs:245:28
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| -- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::cmp::Ord` for type `Todo`
--> src/app.rs:252:1
|
118 | impl Ord for Todo {
| ----------------- first implementation here
...
252 | impl Ord for Todo {
| ^^^^^^^^^^^^^^^^^ conflicting implementation for `Todo`
error[E0119]: conflicting implementations of trait `std::cmp::PartialOrd` for type `Todo`
--> src/app.rs:245:32
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ---------- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^^^^^^^^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::marker::StructuralPartialEq` for type `Todo`
--> src/app.rs:245:17
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| --------- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^^^^^^^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::marker::StructuralEq` for type `Todo`
--> src/app.rs:245:28
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| -- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `Eq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `Store`
--> src/app.rs:145:10
|
11 | #[derive(Debug)]
| ----- first implementation here
...
145 | #[derive(Debug)]
| ^^^^^ conflicting implementation for `Store`
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `Todo`
--> src/app.rs:245:10
|
111 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ----- first implementation here
...
245 | #[derive(Debug, PartialEq, Eq, PartialOrd, rid::Display)]
| ^^^^^ conflicting implementation for `Todo`
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `Filter`
--> src/app.rs:323:17
|
269 | #[derive(Clone, Debug, rid::Display)]
| ----- first implementation here
...
323 | #[derive(Clone, Debug, rid::Display)]
| ^^^^^ conflicting implementation for `Filter`
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Debug` for type `Msg`
--> src/app.rs:345:10
|
291 | #[derive(Debug)]
| ----- first implementation here
...
345 | #[derive(Debug)]
| ^^^^^ conflicting implementation for `Msg`
|
= note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0119]: conflicting implementations of trait `std::fmt::Display` for type `Todo`
--> src/app.rs:258:1
|
124 | impl Display for Todo {
| --------------------- first implementation here
...
258 | impl Display for Todo {
| ^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Todo`
error[E0119]: conflicting implementations of trait `std::fmt::Display` for type `Filter`
--> src/app.rs:330:1
|
276 | impl Display for Filter {
| ----------------------- first implementation here
...
330 | impl Display for Filter {
| ^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Filter`
error[E0119]: conflicting implementations of trait `rid::RidStore<Msg>` for type `Store`
--> src/app.rs:152:1
|
18 | impl RidStore<Msg> for Store {
| ---------------------------- first implementation here
...
152 | impl RidStore<Msg> for Store {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Store`
error[E0119]: conflicting implementations of trait `rid::allo_isolate::IntoDart` for type `Reply`
--> src/app.rs:364:10
|
310 | pub enum Reply {
| ----- first implementation here
...
364 | pub enum Reply {
| ^^^^^ conflicting implementation for `Reply`
error: aborting due to 36 previous errors; 1 warning emitted
Some errors have detailed explanations: E0119, E0252, E0428.
For more information about an error, try `rustc --explain E0119`.
error: could not compile `rid_dart_todo`
To learn more, run the command again with --verbose.