Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Various issues with getting examples to run #2

Open
@InfiniteRain

Description

@InfiniteRain

So, while trying to get any example to work, I've met the following issues:

  1. Already reported in one of the other issues, but the dioxus dependency references an invalid relative path.
  2. ios_demo seems to be referencing invalid API. Seems to me like it's been developed during early stages of development and is not compatible with the version 1.0. I get a ton of different compile time errors while trying to compile:
❯ cargo build
   Compiling dioxus-ios-demo v0.1.0 (/Users/dlossenko/projects/example-projects/ios_demo)
error: expected item, found `;`
   --> src/lib.rs:124:2
    |
124 | };
    |  ^ help: remove this semicolon

error: macro expansion ignores token `compile_error` and any following
   --> src/lib.rs:83:26
    |
79  |       cx.render(rsx!{
    |  _______________-
80  | |         section { class: "todoapp"
81  | |             style { {[include_str!("./style.css")]} }
82  | |             div {
83  | |                 header { class: "header"
    | |                          ^^^^^
...   |
122 | |         }
123 | |     })
    | |     -- help: you might be missing a semicolon here: `;`
    | |_____|
    |       caused by the macro expansion here
    |
    = note: the usage of `rsx!` is likely invalid in expression context

error: This attribute is misisng a trailing comma
  --> src/lib.rs:80:19
   |
80 |         section { class: "todoapp"
   |                   ^^^^^

error: macro expansion ignores token `compile_error` and any following
   --> src/lib.rs:142:19
    |
140 |       cx.render(rsx!{
    |  _______________-
141 | |         li { class: "{completed}"
142 | |             div { class: "view"
    | |                   ^^^^^
143 | |                 input { class: "toggle" r#type: "checkbox" id: "cbg-{todo.id}" checked: "{todo.checked}"
...   |
165 | |         }
166 | |     })
    | |     -- help: you might be missing a semicolon here: `;`
    | |_____|
    |       caused by the macro expansion here
    |
    = note: the usage of `rsx!` is likely invalid in expression context

error: This attribute is misisng a trailing comma
   --> src/lib.rs:141:14
    |
141 |         li { class: "{completed}"
    |              ^^^^^

error[E0425]: cannot find function `use_provide_state` in this scope
  --> src/lib.rs:29:5
   |
29 |     use_provide_state(cx, || Todos::new());
   |     ^^^^^^^^^^^^^^^^^ not found in this scope

error[E0425]: cannot find function `use_shared_state` in this scope
  --> src/lib.rs:37:17
   |
37 |     let todos = use_shared_state::<Todos>(cx)?;
   |                 ^^^^^^^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `FC` in this scope
   --> src/lib.rs:131:19
    |
131 | static TodoEntry: FC<TodoEntryProps> = |(cx, props)| {
    |                   ^^ help: a trait with a similar name exists: `Fn`
    |
   ::: /Users/dlossenko/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:67:1
    |
67  | pub trait Fn<Args>: FnMut<Args> {
    | ------------------------------- similarly named trait `Fn` defined here

error[E0425]: cannot find function `use_shared_state` in this scope
   --> src/lib.rs:132:17
    |
132 |     let todos = use_shared_state::<Todos>(cx)?;
    |                 ^^^^^^^^^^^^^^^^ not found in this scope

Some errors have detailed explanations: E0412, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `dioxus-ios-demo` due to 9 previous errors
  1. Other projects I tried seems to have similar issues when I try to run them on mobile (like the dog-app exits with a compile error in one of the dependencies after I ran cargo mobile init on it and fixed the cargo.toml file.)

It would be much appreciated if you guys tried to run all these examples yourselves and fixed the issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions