Git Product home page Git Product logo

Comments (15)

SimonSapin avatar SimonSapin commented on August 23, 2024 60

cargo +nightly install --git https://github.com/kbknapp/cargo-graph --force worked for me.

from cargo-graph.

Trolldemorted avatar Trolldemorted commented on August 23, 2024 21

unfortunately cargo install still installs an older version - could you push a new one?

from cargo-graph.

mrcnski avatar mrcnski commented on August 23, 2024 11

You can use my fork instead, which includes the fix for this (as well as for many, many other bugs), plus has some new features (plus is actually maintained).

cargo install cargo-deps

See the new features with

cargo deps -h

from cargo-graph.

Boscop avatar Boscop commented on August 23, 2024 7

Any update on this?

from cargo-graph.

crawford avatar crawford commented on August 23, 2024 6

Bump.

from cargo-graph.

shaleh avatar shaleh commented on August 23, 2024 5

Yes please. I came to submit the same issue.

from cargo-graph.

ChristopherMacGown avatar ChristopherMacGown commented on August 23, 2024 2

Until a new version is pushed, you can add the following to your Cargo.lock to get around the issue temporarily.

[root]
name="your-package-name"

Doing so will cause other cargo commands to fail, however. That's because future/current cargo will see that as duplicating the project definition.

from cargo-graph.

tjyang avatar tjyang commented on August 23, 2024 2

Thanks @m-cat for your pointer. I will follow cargo-deps instead.

[pi@centos7 cargo-deps]$ cargo  deps -h
cargo-deps 1.0.3
Marcin S. <[email protected]>:Kevin K. <[email protected]>:Max New <[email protected]>
Cargo subcommand for building dependency graphs of Rust projects.

USAGE:
    cargo deps [FLAGS] [OPTIONS]

FLAGS:
        --all-deps            Include all dependencies in the graph. Can be used with --no-regular-deps
        --build-deps          Include build dependencies in the graph (purple)
        --dev-deps            Include dev dependencies in the graph (blue)
    -h, --help                Prints help information
        --include-orphans     Don't purge orphan nodes (yellow). This is useful in some workspaces
    -I, --include-versions    Include the dependency version on nodes
        --no-regular-deps     Exclude regular dependencies from the graph
        --optional-deps       Include optional dependencies in the graph (red)
    -V, --version             Prints version information

OPTIONS:
    -o, --dot-file <PATH>           Output file [default: stdout]
        --filter <DEPNAMES>...      Only display provided deps
        --manifest-path <PATH>      Specify location of manifest file [default: Cargo.toml]
        --subgraph <DEPNAMES>...    Group provided deps in their own subgraph
        --subgraph-name <NAME>      Optional name of subgraph
[pi@centos7 cargo-deps]$

from cargo-graph.

remram44 avatar remram44 commented on August 23, 2024

This is caused by recent changes to Cargo. #38 fixes the issue.

from cargo-graph.

aochagavia avatar aochagavia commented on August 23, 2024

Same here

from cargo-graph.

laumann avatar laumann commented on August 23, 2024

@ChristopherMacGown Thanks for the tip!

I had to add version as well to Cargo.lock, like so:

[root]
name="your-package-name"
version="package-version"

worked like a charm.

from cargo-graph.

chisophugis avatar chisophugis commented on August 23, 2024

I just tripped on this. What is the status? According to the earlier comment #38 fixes this, which was merged like 6 months ago.

from cargo-graph.

sstelfox avatar sstelfox commented on August 23, 2024

Ditto, ended up going with the forced git install.

from cargo-graph.

spearman avatar spearman commented on August 23, 2024

Is this the same as error: No name for package in toml file ?

from cargo-graph.

tjyang avatar tjyang commented on August 23, 2024

I was able to get it going by following steps on a CentOS 7 OS.

  • check out cargo-count repo.
[[pi@centos7 cargo-count]$ pwd
/home/pi/gb/cargo-count
[pi@centos7 cargo-count]$
  • commands
 sudo yum install -y graphviz
 git clone https://github.com/kbknapp/cargo-graph && cd cargo-graph
 cargo build --release
 cargo install  --force
 cd ../cargo-count/
 cargo graph  --optional-line-style dashed --optional-line-color red --optional-shape box --build-shape diamond --build-color green --build-line-color orange > cargo-count.dot
 dot -Tpng > rainbow-graph.png cargo-count.dot

[pi@centos7 cargo-count]$ ls -l *.png
-rw-rw-r-- 1 pi pi  59023 Feb 21 07:00 cargo-count.png
-rw-rw-r-- 1 pi pi 144496 Feb 21 07:10 rainbow-graph.png
[pi@centos7 cargo-count]$


from cargo-graph.

Related Issues (20)

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.