Skip to content
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

Linux support for examples #4

Merged
merged 3 commits into from
Jul 15, 2021
Merged

Linux support for examples #4

merged 3 commits into from
Jul 15, 2021

Conversation

MGlolenstine
Copy link
Contributor

I made all examples compile on Linux.
I added desktop support for todo_cubit.

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.

@thlorenz
Copy link
Owner

Thanks for this .. it seems like code is expanded differently and/or that dart example needs to be modified ... will look into that later

@thlorenz thlorenz merged commit cd3bf52 into thlorenz:master Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants