Open f-fr opened 6 years ago
This is caused by recent changes to Cargo. #38 fixes the issue.
unfortunately cargo install still installs an older version - could you push a new one?
Yes please. I came to submit the same issue.
Same here
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.
@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.
cargo +nightly install --git https://github.com/kbknapp/cargo-graph --force
worked for me.
I just tripped on this. What is the status? According to the earlier comment #38 fixes this, which was merged like 6 months ago.
Ditto, ended up going with the forced git install.
Bump.
Is this the same as error: No name for package in toml file
?
Any update on this?
I was able to get it going by following steps on a CentOS 7 OS.
[[pi@centos7 cargo-count]$ pwd
/home/pi/gb/cargo-count
[pi@centos7 cargo-count]$
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]$
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
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. <marcin.swieczkowski@gmail.com>:Kevin K. <kbknapp@gmail.com>:Max New <maxsnew@gmail.com>
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]$
When running
cargo graph
on an arbitrary project I receive the following error message:I have no idea what this error means or how I can get more information about the problem. Any ideas?