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

Lockfile parsing fails with "invalid serialized PackageId for key package.dependencies" #4

Closed
str4d opened this issue Mar 3, 2021 · 2 comments · Fixed by #6
Closed

Comments

@str4d
Copy link
Contributor

str4d commented Mar 3, 2021

When I try to run cargo authors inside https://github.com/zcash/halo2, I get the following error:

$ git rev-list -n 1 HEAD
ec38a06fbf2d74247363828141a02172b8c7c848
str4d@Charana:~/dev/rust/zcash/halo2 (main) ^_^
$ RUST_BACKTRACE=1 cargo authors
error: failed to parse lock file at: /home/str4d/dev/rust/zcash/halo2/Cargo.lock
caused by: invalid serialized PackageId for key `package.dependencies`
backtrace:    0: failure::backtrace::internal::InternalBacktrace::new
   1: failure::backtrace::Backtrace::new
   2: cargo::ops::lockfile::load_pkg_lockfile
   3: cargo::ops::resolve::resolve_with_registry
   4: cargo::ops::resolve::resolve_ws_with_method
   5: cargo::ops::resolve::resolve_ws_precisely
   6: cargo_authors::real_main
   7: cargo_authors::main
   8: std::sys_common::backtrace::__rust_begin_short_backtrace
   9: std::rt::lang_start::{{closure}}
  10: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/core/src/ops/function.rs:259:13
      std::panicking::try::do_call
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:379:40
      std::panicking::try
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panicking.rs:343:19
      std::panic::catch_unwind
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/panic.rs:396:14
      std::rt::lang_start_internal
             at /rustc/cb75ad5db02783e8b0222fee363c5f63f7e2cf5b/library/std/src/rt.rs:51:25
  11: main
  12: __libc_start_main
  13: _start

I installed cargo-authors using Rust 1.50.0.

@str4d
Copy link
Contributor Author

str4d commented Mar 3, 2021

I get this with other crates too, so my initial guess (before digging in at all) is that this crate doesn't support the v2 lockfile format? rust-lang/cargo#7070

This was referenced Mar 4, 2021
@Henning-K
Copy link
Owner

Thank you for the bug report and the quick fix. I checked out your branch and everything appears to be in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants