DioxusLabs/manganis

Main panicked in manganis-cli-support-0.2.4/src/manifest.rs

nigeleke opened this issue · 7 comments

Problem

dx build results in panic of manganis-cli-support in "clean" project.

Steps To Reproduce

dx new example
Web
Vanilla
false

cd example
dx build

Expected behavior

Expected build of example app to complete successfully.

Screenshots / Stack trace

nigel@fedora:~/Documents/example3$ dx build
  👑 Build done. 
   thread 'main' panicked at /home/nigel/.cargo/registry/src/index.crates.io-6f17d22bba15001f/manganis-cli-support-0.2.4/src/manifest.rs:51:51:
called `Result::unwrap()` on an `Err` value: Parse("parse error: invalid Cargo.lock format version: `4`\n")
stack backtrace:
   0:     0x55d1ccdadb5a - <std::sys::backtrace::BacktraceLock::print::DisplayBacktrace as core::fmt::Display>::fmt::h314cd50504129941
   1:     0x55d1ccddfdc3 - core::fmt::write::hc2ee7d2d213c8e87
   2:     0x55d1ccda76c3 - std::io::Write::write_fmt::h7394b16a4a4f3368
   3:     0x55d1ccdad9a2 - std::sys::backtrace::BacktraceLock::print::hf978fb87e8f10258
   4:     0x55d1ccdaecbc - std::panicking::default_hook::{{closure}}::h1dd794631d09a81f
   5:     0x55d1ccdaeb02 - std::panicking::default_hook::h74245ae16a8e3fed
   6:     0x55d1ccdaf2f7 - std::panicking::rust_panic_with_hook::ha97360e1af624ce0
   7:     0x55d1ccdaf18a - std::panicking::begin_panic_handler::{{closure}}::h45813efe693be889
   8:     0x55d1ccdae039 - std::sys::backtrace::__rust_end_short_backtrace::hed80b0bf9cba864a
   9:     0x55d1ccdaee1c - rust_begin_unwind
  10:     0x55d1ccddc6a0 - core::panicking::panic_fmt::ha4275ca3c44593bc
  11:     0x55d1ccddcae6 - core::result::unwrap_failed::hc087e72af6d85d66
  12:     0x55d1cb60d1f9 - <manganis_common::manifest::AssetManifest as manganis_cli_support::manifest::AssetManifestExt>::load_from_path::hac1433d3745cf796
  13:     0x55d1ca875de1 - dioxus_cli::assets::asset_manifest::h064d9cd05ec3448a
  14:     0x55d1ca94a4b2 - dioxus_cli::builder::build_web::h151874737dfaba6d
  15:     0x55d1caa0c85a - dioxus_cli::cli::build::Build::build::h761cb0fa84abca77
  16:     0x55d1ca70370c - tokio::runtime::park::CachedParkThread::block_on::h3d665568786f9824
  17:     0x55d1ca790f4a - tokio::runtime::context::runtime::enter_runtime::h4fdfef6c4fd5ec79
  18:     0x55d1ca83bea0 - dx::main::h403b2bf25fe40f1c
  19:     0x55d1ca7d7fa3 - std::sys::backtrace::__rust_begin_short_backtrace::h09a70fcc6a68922f
  20:     0x55d1ca767d6d - std::rt::lang_start::{{closure}}::hf30745103249386e
  21:     0x55d1ccd9ce5e - std::rt::lang_start_internal::h2dd41d4bc5ea291e
  22:     0x55d1ca83c075 - main
  23:     0x7f204ccc2088 - __libc_start_call_main
  24:     0x7f204ccc214b - __libc_start_main@@GLIBC_2.34
  25:     0x55d1ca683025 - _start
  26:                0x0 - <unknown>
nigel@fedora:~/Documents/example3$ 

Environment:

  • Rust version: rustc 1.84.0-nightly
  • OS info: Fedora Linux 40 (Workstation Edition)
  • App platform: web

Please, add the commit hash/version of Dioxus you are using and the MRE (minimal reproducible example).

@Andrew15-5 This was dioxus-0.5.7. The MRE would be following exactly the steps outlined above... I didn't edit anything from the generated code. (Still happy to add zip file if you wish, though see below).

... however... I installed the "hot of the press" 0.6 version from git, and used it in my Cargo file. This resolved the build error. (I suspect it is related to the manganis 0.3 update...???)

... however... I installed the "hot of the press" 0.6 version from git, and used it in my Cargo file. This resolved the build error.

Great, then this makes this issue resolved.

(I suspect it is related to the manganis 0.3 update...???)

Maybe. Try using the commit before the 0.3 update, if you want to make sure.

Given your comment on "issue resolved" I will close the issue. It is still an issue if someone needs to stick with 0.5.7 for some reason.

I think you understand that this is normal. Dioxus is not at a fully stable state yet. So some issues are expected to happen (it's basically in a beta stage). And it's obvious, that if you stick with an outdated version, then you won't be able to make the problem go away. There is a thing as backporting a fix, but I'm not sure if Dioxus devs are doing it at all. But if someone really needs the fix, they can backport a patch themselves by cloning/forking the repo.

The 0.6 release will be soon, so everyone should consider upgrading/using the new version instead.

I think you understand that this is normal. Dioxus is not at a fully stable state yet. So some issues are expected to happen (it's basically in a beta stage). And it's obvious, that if you stick with an outdated version, then you won't be able to make the problem go away. There is a thing as backporting a fix, but I'm not sure if Dioxus devs are doing it at all. But if someone really needs the fix, they can backport a patch themselves by cloning/forking the repo.

The 0.6 release will be soon, so everyone should consider upgrading/using the new version instead.

Totally on board with that approach. Love the work being done and very much enjoying Dioxus & the community around it.