Giter Club home page Giter Club logo

cargo-real-deps's People

Contributors

geal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cargo-real-deps's Issues

"invalid serialized PackageId"

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.

Handle running as Cargo subcommand

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

Undefined behavior: attempted to zero-initialize type ... which is invalid

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

Wrong command syntax in readme

The readme shows CLI syntax that looks like:

$ cargo-real-deps /path/to/nom/Cargo.toml

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.