DioxusLabs / dioxus

Fullstack app framework for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
21.47k stars 826 forks source link

Example rsx_usage failes to build #521

Closed caemor closed 2 years ago

caemor commented 2 years ago

Problem

'cargo run --example rsx_usage' hits unimplemented code

Steps To Reproduce

Steps to reproduce the behavior: Run the above command.

Error message/Backtrace: ``` RUST_BACKTRACE=1 cargo run --example rsx_usage Finished dev [unoptimized + debuginfo] target(s) in 0.27s Running `target/debug/examples/rsx_usage` thread '' panicked at 'not yet implemented', examples/rsx_usage.rs:223:9 stack backtrace: 0: rust_begin_unwind at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5 1: core::panicking::panic_fmt at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14 2: core::panicking::panic at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:48:5 3: rsx_usage::baller::Baller at ./examples/rsx_usage.rs:223:9 4: as dioxus_core::nodes::AnyProps>::render at ./packages/core/src/nodes.rs:488:9 5: dioxus_core::scopes::ScopeArena::run_scope at ./packages/core/src/scopes.rs:298:29 6: dioxus_core::diff::DiffState::create_component_node at ./packages/core/src/diff.rs:276:13 7: dioxus_core::diff::DiffState::create_node at ./packages/core/src/diff.rs:171:44 8: dioxus_core::diff::DiffState::create_children at ./packages/core/src/diff.rs:1039:24 9: dioxus_core::diff::DiffState::create_and_append_children at ./packages/core/src/diff.rs:1045:23 10: dioxus_core::diff::DiffState::create_element_node at ./packages/core/src/diff.rs:223:17 11: dioxus_core::diff::DiffState::create_node at ./packages/core/src/diff.rs:169:40 12: dioxus_core::virtual_dom::VirtualDom::rebuild at ./packages/core/src/virtual_dom.rs:535:23 13: dioxus_desktop::controller::DesktopController::new_on_tokio::{{closure}}::{{closure}} at ./packages/desktop/src/controller.rs:57:29 14: as core::future::future::Future>::poll at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19 15: tokio::park::thread::CachedParkThread::block_on::{{closure}} at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/park/thread.rs:263:54 16: tokio::coop::with_budget::{{closure}} at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:102:9 17: std::thread::local::LocalKey::try_with at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:445:16 18: std::thread::local::LocalKey::with at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:421:9 19: tokio::coop::with_budget at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:95:5 20: tokio::coop::budget at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:72:5 21: tokio::park::thread::CachedParkThread::block_on at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/park/thread.rs:263:31 22: tokio::runtime::enter::Enter::block_on at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/enter.rs:152:13 23: tokio::runtime::thread_pool::ThreadPool::block_on at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/thread_pool/mod.rs:90:9 24: tokio::runtime::Runtime::block_on at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/mod.rs:484:43 25: dioxus_desktop::controller::DesktopController::new_on_tokio::{{closure}} at ./packages/desktop/src/controller.rs:45:13 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. thread '' panicked at 'called `Option::unwrap()` on a `None` value', packages/core/src/diff.rs:1017:52 stack backtrace: 0: 0x55efd0776bdd - std::backtrace_rs::backtrace::libunwind::trace::h8e036432725b1c57 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x55efd0776bdd - std::backtrace_rs::backtrace::trace_unsynchronized::h4f83092254c85869 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x55efd0776bdd - std::sys_common::backtrace::_print_fmt::h9728b5e056a3ece3 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:66:5 3: 0x55efd0776bdd - ::fmt::h48bb4bd2928827d2 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:45:22 4: 0x55efd079b16c - core::fmt::write::h909e69a2c24f44cc at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/fmt/mod.rs:1196:17 5: 0x55efd0773791 - std::io::Write::write_fmt::h7f4b8ab8af89e9ef at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/io/mod.rs:1654:15 6: 0x55efd07783d5 - std::sys_common::backtrace::_print::hff4838ebf14a2171 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:48:5 7: 0x55efd07783d5 - std::sys_common::backtrace::print::h2499280374189ad9 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:35:9 8: 0x55efd07783d5 - std::panicking::default_hook::{{closure}}::h8b270fc55eeb284e at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:295:22 9: 0x55efd0778049 - std::panicking::default_hook::h3217e229d6e9d13c at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:314:9 10: 0x55efd0778ab8 - std::panicking::rust_panic_with_hook::h9acb8048b738d2e0 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:698:17 11: 0x55efd0778929 - std::panicking::begin_panic_handler::{{closure}}::h70f3b839526af6dc at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:586:13 12: 0x55efd0777094 - std::sys_common::backtrace::__rust_end_short_backtrace::h1ecf2cee857fbe0a at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:138:18 13: 0x55efd0778699 - rust_begin_unwind at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584:5 14: 0x55efd0798bb3 - core::panicking::panic_fmt::h9f8393e7fd56d655 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142:14 15: 0x55efd07989fd - core::panicking::panic::h021666fc6a0f7b6b at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:48:5 16: 0x55efd05fb7dd - core::option::Option::unwrap::hcaf8cf918569aa8a at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/option.rs:755:21 17: 0x55efd0653612 - dioxus_core::diff::DiffState::remove_nodes::h9625ad00872cd36f at /home/caemor/git/dioxus/packages/core/src/diff.rs:1017:38 18: 0x55efd0653191 - dioxus_core::diff::DiffState::remove_nodes::h42dd198eec7ee008 at /home/caemor/git/dioxus/packages/core/src/diff.rs:1009:21 19: 0x55efd065ad7c - ::drop::h835ebf109d524ad9 at /home/caemor/git/dioxus/packages/core/src/virtual_dom.rs:725:9 20: 0x55efd030df67 - core::ptr::drop_in_place::hc65b4273ba8f47e8 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ptr/mod.rs:486:1 21: 0x55efd0300d6a - dioxus_desktop::controller::DesktopController::new_on_tokio::{{closure}}::{{closure}}::h63a8776f4f98b6ea at /home/caemor/git/dioxus/packages/desktop/src/controller.rs:81:13 22: 0x55efd03030ec - as core::future::future::Future>::poll::hf50e8da86b7f7de9 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/future/mod.rs:91:19 23: 0x55efd0362d12 - tokio::park::thread::CachedParkThread::block_on::{{closure}}::h34309196200805c4 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/park/thread.rs:263:54 24: 0x55efd031dcf4 - tokio::coop::with_budget::{{closure}}::hbbaa8116597568d4 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:102:9 25: 0x55efd0349d1a - std::thread::local::LocalKey::try_with::h7dccc38afe6d63c5 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:445:16 26: 0x55efd034956e - std::thread::local::LocalKey::with::h0d3b0bc33efed89a at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/local.rs:421:9 27: 0x55efd0362b98 - tokio::coop::with_budget::hb11f8c54fc384422 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:95:5 28: 0x55efd0362b98 - tokio::coop::budget::h46a53554992fbdd3 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/coop.rs:72:5 29: 0x55efd0362b98 - tokio::park::thread::CachedParkThread::block_on::hfc8c3c315e92b9a9 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/park/thread.rs:263:31 30: 0x55efd034d727 - tokio::runtime::enter::Enter::block_on::h1dc63cca62dda85a at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/enter.rs:152:13 31: 0x55efd0321a0a - tokio::runtime::thread_pool::ThreadPool::block_on::h1ca516e951f84f68 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/thread_pool/mod.rs:90:9 32: 0x55efd03620df - tokio::runtime::Runtime::block_on::h7bdabd5a044c1131 at /home/caemor/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.20.1/src/runtime/mod.rs:484:43 33: 0x55efd0300b1c - dioxus_desktop::controller::DesktopController::new_on_tokio::{{closure}}::h7957f56c3522e3e8 at /home/caemor/git/dioxus/packages/desktop/src/controller.rs:45:13 34: 0x55efd0348d7c - std::sys_common::backtrace::__rust_begin_short_backtrace::h363163b82b8f21f6 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys_common/backtrace.rs:122:18 35: 0x55efd038c9a1 - std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}::he7307a29a688e590 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/mod.rs:501:17 36: 0x55efd0349251 - as core::ops::function::FnOnce<()>>::call_once::hbcee816753e90040 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panic/unwind_safe.rs:271:9 37: 0x55efd034da53 - std::panicking::try::do_call::hfd930231198ea81f at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492:40 38: 0x55efd034db1b - __rust_try 39: 0x55efd034d991 - std::panicking::try::h39d01b127bce554b at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456:19 40: 0x55efd038eb71 - std::panic::catch_unwind::h3871ccf512df8403 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137:14 41: 0x55efd038c79b - std::thread::Builder::spawn_unchecked_::{{closure}}::hc7568c5ab5892cdd at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/thread/mod.rs:500:30 42: 0x55efd030a3df - core::ops::function::FnOnce::call_once{{vtable.shim}}::hdb6a4ae00944f75f at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:248:5 43: 0x55efd077ce33 - as core::ops::function::FnOnce>::call_once::h191d5c5ea3edb31d at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/alloc/src/boxed.rs:1872:9 44: 0x55efd077ce33 - as core::ops::function::FnOnce>::call_once::h42ef7cb2ae640a31 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/alloc/src/boxed.rs:1872:9 45: 0x55efd077ce33 - std::sys::unix::thread::Thread::new::thread_start::he47f7169665dab60 at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/sys/unix/thread.rs:108:17 46: 0x7efdf453354d - 47: 0x7efdf45b8874 - clone 48: 0x0 - thread panicked while panicking. aborting. fish: Job 1, 'RUST_BACKTRACE=1 cargo run --ex…' terminated by signal SIGABRT (Abbruch) ```

Expected behavior

Example builds and shows something :-D

Environment:

jkelleyrtp commented 2 years ago

The rsx_usage example is not very visually interesting and is moreso meant to be a reference, hence the multiple uses of todo!().