Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workspace inheritance not working with Dioxus CLI #1367

Closed
marcerhans opened this issue Aug 16, 2023 · 2 comments · Fixed by #1471
Closed

Workspace inheritance not working with Dioxus CLI #1367

marcerhans opened this issue Aug 16, 2023 · 2 comments · Fixed by #1471
Labels
bug Something isn't working cli Related to the dioxus-cli program

Comments

@marcerhans
Copy link
Contributor

marcerhans commented Aug 16, 2023

Problem
When running "dx build" or "dx serve" it fails because I use workspace fields in the package section. It works fine with good old "cargo run".

I get the following error:
RUST_BACKTRACE=1 dx serve
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Parse(Error { inner: ErrorInner { kind: Custom, line: Some(23), col: 10, at: Some(518), message: "invalid type: map, expected a sequence", key: ["package", "authors"] } })', /home/marcus/.cargo/registry/src/github.com-1ecc6299db9ec823/dioxus-cli-0.4.0/src/config.rs:253:67
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
   2: core::result::unwrap_failed
             at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
   3: dioxus_cli::config::CrateConfig::new
   4: dioxus_cli::cli::serve::Serve::serve::{{closure}}
   5: tokio::runtime::park::CachedParkThread::block_on
   6: tokio::runtime::scheduler::multi_thread::MultiThread::block_on
   7: tokio::runtime::runtime::Runtime::block_on
   8: dx::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Steps To Reproduce
Steps to reproduce the behavior:

  1. Have the following in your Cargo.toml
[workspace.package]
authors = ["marcerhans"]

[package]
authors = { workspace = true }
  1. Run "dx build" or "dx serve".

Expected behavior
I expected the project to build and run (serve).

Environment:

  • Dioxus version: 0.4.0
  • Rust version: 1.71.1
  • OS info: Fedora 37
  • App platform: desktop
@ealmloff
Copy link
Member

ealmloff commented Aug 16, 2023

We need to update the cargo_toml package to parse the new cargo workspace options

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Aug 18, 2023
tigerros added a commit to tigerros/dioxus that referenced this issue Sep 18, 2023
@tigerros tigerros mentioned this issue Sep 18, 2023
@tigerros
Copy link
Contributor

Fixed in #1471

ealmloff pushed a commit that referenced this issue Sep 18, 2023
* Bump cargo_toml to 1.16.0

* Format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants