geal / cargo-real-deps Goto Github PK
View Code? Open in Web Editor NEWCargo subcommand to check which crates are built depending on features
Cargo subcommand to check which crates are built depending on features
I had trouble running cargo-real-deps against a project recently built using a recent version of Cargo.
$ cargo-real-deps --path Cargo.toml
Error: Error { inner: ErrorInner { kind: Custom, line: None, col: 0, at: None, message: "invalid serialized PackageId", key: ["package", "dependencies"] } }
failed to parse lock file at: /path/to/Cargo.lock
I suspect a bump of the cargo
library dependency is needed in order for cargo-real-deps to be able to parse new Cargo.lock syntax.
Typically binaries prefixed with cargo-
are intended to function as Cargo subcommands. When Cargo receives a first argument like cargo COMMAND
it finds and executes cargo-COMMAND
on the path. For example the cargo expand
subcommand is implemented via the cargo-expand crate on crates.io which exposes a cargo-expand
binary.
It looks like cargo-real-deps fails when run that way:
$ cargo real-deps
error: Found argument 'real-deps' which wasn't expected, or isn't valid in this context
USAGE:
cargo-real-deps [FLAGS] [OPTIONS] --path <path>
For more information try --help
Cargo-real-deps appears to immediately panic if built by a recent version of rustc.
$ cargo-real-deps --path Cargo.toml
thread 'main' panicked at 'attempted to zero-initialize type `sized_chunks::sized_chunk::Chunk<(core::package_id::PackageId, im_rc::OrdMap<core::package_id::PackageId, std::rc::Rc<std::vec::Vec<core::dependency::Dependency>>>)>`, which is invalid', /home/david/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/mem/mod.rs:623:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The readme shows CLI syntax that looks like:
Line 16 in afefa18
However, it appears that's incompatible with the published cargo-real-deps crate which wants the Cargo.toml path as a flag rather than positional argument.
$ cargo-real-deps Cargo.toml
error: Found argument 'Cargo.toml' which wasn't expected, or isn't valid in this context
USAGE:
cargo-real-deps [FLAGS] [OPTIONS] --path <path>
For more information try --help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.