Comments (15)
cargo +nightly install --git https://github.com/kbknapp/cargo-graph --force
worked for me.
from cargo-graph.
unfortunately cargo install still installs an older version - could you push a new one?
from cargo-graph.
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.
Any update on this?
from cargo-graph.
Bump.
from cargo-graph.
Yes please. I came to submit the same issue.
from cargo-graph.
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.
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.
This is caused by recent changes to Cargo. #38 fixes the issue.
from cargo-graph.
Same here
from cargo-graph.
@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.
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.
Ditto, ended up going with the forced git install.
from cargo-graph.
Is this the same as error: No name for package in toml file
?
from cargo-graph.
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)
- module graphs? HOT 4
- dependency versions HOT 2
- "duplicated" regular and dev-dependencies are not separated HOT 9
- Panic in DepGraph::render_to HOT 2
- ErdΕs-style graph painting HOT 2
- Panic when a crate has dev-dependencies
- Not deterministic
- Show multiple instances of the same crate separately
- Some dependencies are wrong HOT 1
- cargo graph does not work with cargo workspaces HOT 5
- Optional dependency marked as non-optional HOT 1
- Compile error with rustc 1.15.0-nightly (ebeee0e27 2016-12-04)
- Compile error with rustc 1.15.0-nightly (ebeee0e27 2016-12-04)
- Differentiate dependencies by source HOT 2
- cargo-graph generates incompatible dot files in powershell HOT 3
- Graph only path dependencies (or other filtering) HOT 1
- duplicate key: `version` HOT 2
- Does not work with Cargo 1.41 toml format HOT 1
- Add ability to color deps, not just lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-graph.