Pauan / rust-dominator

Zero-cost ultra-high-performance declarative DOM library using FRP signals for Rust!
MIT License
999 stars 63 forks source link

Examples don't work #11

Closed kirillt closed 5 years ago

kirillt commented 5 years ago
$ rustc --version rustc 1.34.0-nightly (097c04cf4 2019-02-24) $ cargo --version cargo 1.34.0-nightly (5c6aa46e6 2019-02-22) $ git clone https://github.com/Pauan/rust-dominator.git Cloning into 'rust-dominator'... remote: Enumerating objects: 40, done. remote: Counting objects: 100% (40/40), done. remote: Compressing objects: 100% (27/27), done. remote: Total 804 (delta 13), reused 29 (delta 10), pack-reused 764 Receiving objects: 100% (804/804), 421.21 KiB 1.06 MiB/s, done. Resolving deltas: 100% (435/435), done. $ cd rust-dominator/examples/counter/ $ cargo web start --release Compiling proc-macro2 v0.4.24 Compiling unicode-xid v0.1.0 Compiling either v1.5.0 Compiling semver-parser v0.7.0 Compiling libc v0.2.46 Compiling ryu v0.2.7 Compiling rand_core v0.3.0 Compiling serde v1.0.84 Compiling iovec v0.1.2 Compiling pin-utils v0.1.0-alpha.4 Compiling slab v0.4.1 Compiling stdweb-internal-runtime v0.1.3 Compiling itoa v0.4.3 Compiling lazy_static v1.2.0 Compiling sha1 v0.6.0 Compiling base-x v0.2.4 Compiling discard v1.0.4 Compiling futures-core-preview v0.3.0-alpha.11 Compiling rand_core v0.2.2 Compiling semver v0.9.0 error[E0432]: unresolved import core::task::LocalWaker --> /home/kirill/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-preview-0.3.0-alpha.11/src/future/future_obj.rs:6:12
6 task::{LocalWaker, Poll},
^^^^^^^^^^ no LocalWaker in task
error[E0432]: unresolved imports core::task::LocalWaker, core::task::UnsafeWake --> /home/kirill/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-preview-0.3.0-alpha.11/src/task/mod.rs:8:35 8 pub use core::task::{Poll, Waker, LocalWaker, UnsafeWake}; ^^^^^^^^^^ ^^^^^^^^^^ no UnsafeWake in task
no LocalWaker in task
error[E0432]: unresolved imports std::task::Wake, std::task::local_waker, std::task::local_waker_from_nonlocal --> /home/kirill/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-core-preview-0.3.0-alpha.11/src/task/mod.rs:10:21 10 pub use std::task::{Wake, local_waker, local_waker_from_nonlocal}; ^^^^ ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ no local_waker_from_nonlocal in task
no local_waker in task
no Wake in task. Did you mean to use Waker?

Compiling rand v0.5.5 Compiling num_cpus v1.9.0 error: aborting due to 3 previous errors For more information about this error, try rustc --explain E0432. error: Could not compile futures-core-preview. warning: build failed, waiting for other jobs to finish... error: build failed error: build failed

Pauan commented 5 years ago

Thanks for the report, this is because Nightly Rust recently had some breaking changes. I already have the fix ready to go, just waiting for the release of stdweb.

kirillt commented 5 years ago

Great, could you also say which latest version of nightly is ok currently? I will just rollback to it and try the lib while waiting for new stdweb.

Pauan commented 5 years ago

@kirillt Sorry, I don't know. And the issue is more than just the Rust compiler, because various important libraries like Futures and Signals have also been upgraded (to cope with the new Rust changes), so you'd need to downgrade those as well.

Unfortunately, occasional breakage is just an inevitability of Nightly. But with the Futures API finally on the verge of stabilizing, breakage should be rarer now.

I expect this issue to be fixed within a day or two, so you shouldn't need to wait long.

Pauan commented 5 years ago

Version 0.4.3 of dominator has been released, which fully fixes this issue.

Please make sure your Rust and cargo-web are up to date.

kirillt commented 5 years ago

It works, thanks!