dioxus
dioxus copied to clipboard
`dioxus-cli` fails to build on stable/macos
Problem
dioxus-cli fails to build on stable/macos
Steps To Reproduce
On an up-to-date macos, follow the instructions https://dioxuslabs.com/guide/setup.html for macos:
-
rustup target add wasm32-unknown-unknown -
cargo install dioxus-cli
Frown in sorry when you see the error message whilst building dioxus-cli
Expected behavior
It should build and install.
Screenshots
➜ rust git:(proposed-destination-rust) ✗ cargo install dioxus-cli
Updating crates.io index
Installing dioxus-cli v0.1.4
Compiling proc-macro2 v1.0.43
Compiling unicode-ident v1.0.4
Compiling quote v1.0.21
Compiling syn v1.0.99
Compiling libc v0.2.132
Compiling cfg-if v1.0.0
Compiling version_check v0.9.4
Compiling autocfg v1.1.0
Compiling log v0.4.17
Compiling memchr v2.5.0
Compiling cc v1.0.73
Compiling itoa v1.0.3
Compiling serde_derive v1.0.144
Compiling thiserror v1.0.35
Compiling typenum v1.15.0
Compiling pkg-config v0.3.25
Compiling serde v1.0.144
Compiling pin-project-lite v0.2.9
Compiling futures-core v0.3.24
Compiling bytes v1.2.1
Compiling once_cell v1.14.0
Compiling anyhow v1.0.65
Compiling leb128 v0.2.5
Compiling futures-channel v0.3.24
Compiling futures-sink v0.3.24
Compiling futures-task v0.3.24
Compiling futures-util v0.3.24
Compiling fnv v1.0.7
Compiling unicode-segmentation v1.10.0
Compiling parking_lot_core v0.9.3
Compiling smallvec v1.9.0
Compiling futures-io v0.3.24
Compiling pin-utils v0.1.0
Compiling scopeguard v1.1.0
Compiling wasmparser v0.77.0
Compiling id-arena v2.2.1
Compiling percent-encoding v2.2.0
Compiling cpufeatures v0.2.5
Compiling byteorder v1.4.3
Compiling tinyvec_macros v0.1.0
Compiling httparse v1.8.0
Compiling serde_json v1.0.85
Compiling wit-schema-version v0.1.0
Compiling adler v1.0.2
Compiling ryu v1.0.11
Compiling ppv-lite86 v0.2.16
Compiling crc32fast v1.3.2
Compiling mime v0.3.16
Compiling ucd-trie v0.1.5
Compiling unicode-bidi v0.3.8
Compiling bitflags v1.3.2
Compiling failure_derive v0.1.8
Compiling rustc-demangle v0.1.21
Compiling core-foundation-sys v0.8.3
Compiling httpdate v1.0.2
Compiling tower-service v0.3.2
Compiling crossbeam-utils v0.8.11
Compiling base64 v0.13.0
Compiling gimli v0.26.2
Compiling opaque-debug v0.3.0
Compiling unicode-xid v0.2.4
Compiling async-trait v0.1.57
Compiling wasm-bindgen-shared v0.2.83
Compiling utf-8 v0.7.6
Compiling camino v1.1.1
Compiling semver v1.0.14
Compiling try-lock v0.2.3
Compiling tower-layer v0.3.1
Compiling curl v0.4.44
Compiling lazy_static v1.4.0
Compiling hashbrown v0.12.3
Compiling http-range-header v0.3.0
Compiling remove_dir_all v0.5.3
Compiling os_str_bytes v6.3.0
Compiling wasmparser v0.59.0
Compiling heck v0.4.0
Compiling safemem v0.3.3
Compiling same-file v1.0.6
Compiling fastrand v1.8.0
Compiling hex v0.3.2
Compiling textwrap v0.15.1
Compiling regex-syntax v0.6.27
Compiling siphasher v0.2.3
Compiling sync_wrapper v0.1.1
Compiling strsim v0.10.0
Compiling termcolor v1.1.3
Compiling matchit v0.4.6
Compiling is_executable v0.1.2
Compiling convert_case v0.5.0
Compiling fs_extra v1.2.0
Compiling generic-array v0.14.6
Compiling unicase v2.6.0
Compiling proc-macro-error-attr v1.0.4
Compiling proc-macro-error v1.0.4
Compiling slab v0.4.7
Compiling lock_api v0.4.8
Compiling tokio v1.21.1
Compiling num-traits v0.2.15
Compiling indexmap v1.9.1
Compiling num-integer v0.1.45
Compiling libz-sys v1.1.8
Compiling curl-sys v0.4.56+curl-7.83.1
Compiling bzip2-sys v0.1.11+1.0.8
Compiling backtrace v0.3.66
Compiling tracing-core v0.1.29
Compiling wast v21.0.0
Compiling http v0.2.8
Compiling form_urlencoded v1.1.0
Compiling heck v0.3.3
Compiling tinyvec v1.6.0
Compiling wit-writer v0.2.0
Compiling miniz_oxide v0.5.4
Compiling clap_lex v0.2.4
Compiling base64 v0.9.3
Compiling walkdir v2.3.2
Compiling addr2line v0.17.0
Compiling http-body v0.4.5
Compiling headers-core v0.2.0
Compiling unicode-normalization v0.1.22
Compiling tracing v0.1.36
Compiling want v0.3.0
Compiling object v0.29.0
Compiling aho-corasick v0.7.19
Compiling socket2 v0.4.7
Compiling num_cpus v1.13.1
Compiling signal-hook-registry v1.4.0
Compiling mio v0.8.4
Compiling getrandom v0.2.7
Compiling time v0.1.44
Compiling filetime v0.2.17
Compiling atty v0.2.14
Compiling xattr v0.2.3
Compiling dirs v1.0.5
Compiling fsevent-sys v4.1.0
Compiling tempfile v3.3.0
Compiling idna v0.3.0
Compiling flate2 v1.0.24
Compiling iana-time-zone v0.1.48
Compiling wit-parser v0.2.0
Compiling wit-text v0.8.0
Compiling crossbeam-channel v0.5.6
Compiling regex v1.6.0
Compiling rand_core v0.6.4
Compiling colored v1.9.3
Compiling tar v0.4.38
Compiling mime_guess v2.0.4
Compiling wit-validator v0.2.1
Compiling parking_lot v0.12.1
Compiling url v2.3.1
Compiling rand_chacha v0.3.1
Compiling fern v0.6.1
Compiling crypto-common v0.1.6
Compiling block-buffer v0.10.3
Compiling block-buffer v0.9.0
Compiling digest v0.9.0
Compiling rand v0.8.5
Compiling digest v0.10.5
Compiling sha-1 v0.9.8
Compiling sha1 v0.10.5
Compiling sha-1 v0.10.0
Compiling bzip2 v0.4.3
Compiling chrono v0.4.22
Compiling headers v0.3.8
Compiling synstructure v0.12.6
Compiling thiserror-impl v1.0.35
Compiling futures-macro v0.3.24
Compiling walrus-macro v0.19.0
Compiling tokio-macros v1.8.0
Compiling pin-project-internal v1.0.12
Compiling clap_derive v3.2.18
Compiling failure v0.1.8
Compiling walrus v0.19.0
Compiling pin-project v1.0.12
Compiling pest v2.3.1
Compiling tungstenite v0.16.0
Compiling zip v0.5.13
Compiling binary-install v0.0.2
Compiling clap v3.2.22
Compiling pest_meta v2.3.1
Compiling pest_generator v2.3.1
Compiling pest_derive v2.3.1
Compiling futures-executor v0.3.24
Compiling axum-core v0.1.2
Compiling futures v0.3.24
Compiling wasm-bindgen-wasm-conventions v0.2.83
Compiling wit-walrus v0.6.0
Compiling wasm-bindgen-externref-xform v0.2.83
Compiling wasm-bindgen-multi-value-xform v0.2.83
Compiling wasm-bindgen-wasm-interpreter v0.2.83
Compiling wasm-bindgen-threads-xform v0.2.83
Compiling toml v0.5.9
Compiling serde_urlencoded v0.7.1
Compiling cargo-platform v0.1.2
Compiling notify v5.0.0
Compiling tokio-util v0.7.4
Compiling tokio-tungstenite v0.16.1
Compiling hyper v0.14.20
Compiling wasm-bindgen-cli-support v0.2.83
Compiling html_parser v0.6.3
Compiling cargo_toml v0.11.6
Compiling cargo_metadata v0.14.2
Compiling tower v0.4.13
Compiling tower-http v0.2.5
Compiling axum v0.4.8
Compiling dioxus-cli v0.1.4
error[E0061]: this function takes 2 arguments but 1 argument was supplied
--> /Users/coliny/.cargo/registry/src/github.com-1ecc6299db9ec823/dioxus-cli-0.1.4/src/server/mod.rs:35:23
|
35 | let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
| _______________________^^^^^^^^^^^^^^^^^^^^^^^-
36 | | if chrono::Local::now().timestamp() > last_update_time
37 | | && builder::build(&watcher_conf).is_ok()
38 | | {
... |
53 | | }
54 | | })
| |______- an argument of type `notify::Config` is missing
|
note: associated function defined here
--> /Users/coliny/.cargo/registry/src/github.com-1ecc6299db9ec823/notify-5.0.0/src/lib.rs:294:8
|
294 | fn new<F: EventHandler>(event_handler: F, config: config::Config) -> Result<Self>
| ^^^
help: provide the argument
|
35 ~ let mut watcher = RecommendedWatcher::new(move |_: notify::Result<notify::Event>| {
36 + if chrono::Local::now().timestamp() > last_update_time
37 + && builder::build(&watcher_conf).is_ok()
38 + {
39 + // change the websocket reload state to true;
40 + // the page will auto-reload.
41 + if watcher_conf
42 + .dioxus_config
43 + .web
44 + .watcher
45 + .reload_html
46 + .unwrap_or(false)
47 + {
48 + let _ = Serve::regen_dev_page(&watcher_conf);
49 + }
50 + println!("watcher send reload");
51 + reload_tx.send("reload".into()).unwrap();
52 + last_update_time = chrono::Local::now().timestamp();
53 + }
54 + }, /* notify::Config */)
|
For more information about this error, try `rustc --explain E0061`.
error: could not compile `dioxus-cli` due to previous error
error: failed to compile `dioxus-cli v0.1.4`, intermediate artifacts can be found at `/var/folders/5y/d6h0nl814gdcttpccc5ykfm00000gn/T/cargo-installeJcu54`
Environment:
- Dioxus version: N/A
- Rust version: Stable
- OS info: MacOS
- App platform: N/A
Questionnaire
- [ ] I'm interested in fixing this myself but don't know where to start
- [ ] I would like to fix and I have a solution
- [ ] I don't have time to fix this right now, but maybe later
A library the cli depends on had some breaking changes. If you install from the git master branch it succeeds. See https://github.com/DioxusLabs/cli/issues/59 for more info.
I'll leave this open for you to close as appropriate - thanks @Demonthos