dioxus
dioxus copied to clipboard
DIoxus CLI build is broken
Problem
The Dioxus CLI build pipeline is failing, it seems like an issue with some target-specific features being included on unsupported targets.
error[E0063]: missing field `desktop_template` in initializer of `tauri_bundler::DebianSettings`
--> packages/cli/src/config.rs:381:9
|
381 | tauri_bundler::DebianSettings {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `desktop_template`
error[E0063]: missing fields `compression`, `custom_language_files` and `template` in initializer of `tauri_bundler::NsisSettings`
--> packages/cli/src/config.rs:517:9
|
517 | tauri_bundler::NsisSettings {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `compression`, `custom_language_files` and `template`
For more information about this error, try `rustc --explain E0063`.
Steps To Reproduce
View the failed build here: https://github.com/DioxusLabs/dioxus/actions/runs/71221268
Expected behavior
The build should complete successfully.
Environment: 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
The pipeline run you linked looks like it does not exist anymore. I tried installing dioxus-cli from the current git version and the published version on macos and both succeeded:
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli
cargo install dioxus-cli
You might need to run cargo update. This looks like the same error as https://github.com/DioxusLabs/dioxus/issues/1413
It seems like the features it's complaining about are Windows and macOS specific, why are those being included in the Linux build?
Here's the link to the workflow, if you click on the latest run you'll see the error, not sure why linking to the run directly isn't working: https://github.com/DioxusLabs/dioxus/actions/workflows/cli_release.yml
It seems like the features it's complaining about are Windows and macOS specific, why are those being included in the Linux build?
Dioxus uses tauri-bundle to bundle dioxus applications. It includes logic to bundle every platform, including platforms that you are not currently on. That could be useful when cross compiling to another operating system.
Here's the link to the workflow, if you click on the latest run you'll see the error, not sure why linking to the run directly isn't working: https://github.com/DioxusLabs/dioxus/actions/workflows/cli_release.yml
The latest release of diouxs-cli is 0.4.3. There might be something wrong with that workflow (maybe the package cache is out of date?). The CI used x86_64-unknown-linux-gnu to build the CLI. The docs.rs build also used x86_64-unknown-linux-gnu but the build succeeded: https://docs.rs/dioxus-cli/0.4.3/dioxus_cli/
Ah yeah the package cache could be the issue, maybe we need to tweak the key used by the cache. I'll try to look at this later this week if I have time
Came here with the same problem
error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
--> src/server/mod.rs:83:37
|
83 | pub messages: broadcast::Sender<Template<'static>>,
| ^^^^^^^^--------- help: remove these generics
| |
| expected 0 lifetime arguments
|
note: struct defined here, with 0 lifetime parameters
--> /Users/mgt/.cargo/git/checkouts/dioxus-1e619ce595d3799d/451a8f2/packages/core/src/nodes.rs:290:12
|
290 | pub struct Template {
| ^^^^^^^^
For more information about this error, try `rustc --explain E0107`.
error: could not compile `dioxus-cli` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `dioxus-cli v0.3.1 (https://github.com/DioxusLabs/cli#10c9f3db)`, intermediate artifacts can be found at `/var/folders/yz/vqr9r5hj55jb08qx9sncx0h00000gn/T/cargo-installm5KS9s`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
this is on macos.
stable-aarch64-apple-darwin (default)
rustc 1.76.0 (07dca489a 2024-02-04)
error: failed to compile
dioxus-cli v0.3.1 (https://github.com/DioxusLabs/cli#10c9f3db), intermediate artifacts can be found at/var/folders/yz/vqr9r5hj55jb08qx9sncx0h00000gn/T/cargo-installm5KS9s.
It looks like you are trying to install the dioxus CLI from the old dioxuslabs/cli repo. The dioxus CLI now lives in the main dioxus repo. The git version of the CLI can be installed with:
cargo install --git https://github.com/DioxusLabs/dioxus dioxus-cli