Open
Description
Problem
In cargo metadata, the name
field in deps
has -
transformed to _
, which means you need to normalize -/_ in order to compare it with the name
field in dependencies
.
For example:
"dependencies": [
{
"name": "proc-macro2",
"source": "registry+https://github.com/rust-lang/crates.io-index",
"req": "^0.4",
"kind": null,
[...]
"deps": [
{
"name": "proc_macro2",
"pkg": "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)"
},
Steps
- Have a Cargo.toml with
proc-macro2
as a dependency - Run
cargo metadata
and compare thedependency
anddeps
fields
Possible Solution(s)
The deps
entries should have some field which directly corresponds to a field in dependencies
.
Notes
Output of cargo version
:
cargo 1.38.0-nightly (e853aa9 2019-08-09)