More precise dependency list
cargo metadata's feature unification across all dependency types, including dev-dependencies, causes it to over-report the dependency graph in certain cases. This PR works around that, fixing the long-standing issue #66
@Shnatsel , what is the next step with this? How can I help?
The path to shipping this looks like this:
- Make parsing
cargo treereturn aResultinstead of panicking. Print a warning and continue if it fails. - Add a
rev: 2field to the generated JSON. It will be a marker that specifies that the dependency tree is accurate. Write it only if parsingcargo treesucceeds. - Do a bunch of housekeeping around adding that field: bump semver where appropriate (in auditable-serde and everything that depends on it), regenerate the JSON schema, anything else that comes up.
You can help by cloning this branch, doing the things from this list and opening a PR with the changes.
We've discovered a significant issue with this approach which is documented in #216, I've updated the tests to demonstrate it
I believe it will be possible to work around by passing through the working directory as well as flags -p/--package, --workspace, --exclude and --all from the original cargo auditable build call on to cargo tree. This will add a nontrivial amount of complexity, but it should be manageable since we already have all the required infrastructure in place.