You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.
For example, for a test crate that has guppy as a dev dependency and no other dependency specified in the crate to make sure guppy doesn't appear elsewhere in the dep-graph, below code
// The crate has a single dependency, `guppy` as a dev-dependency
let pkg = graph.packages().find(|p| p.name() == "guppy").unwrap();
for link in pkg.direct_links_directed(DependencyDirection::Forward){
println!("{:?}, {:?}, {:?}, {:?}",
link.to().name(), link.normal().is_present(),
link.dev().is_present(), link.dev_only());
}
Ahh I see what's going on there. PackageLinks only have local context: if guppy is built as a normal dependency, then these would be included as normal dependencies as well.
The documentation could be improved here; I'll leave this issue open for that.
sunshowers
changed the title
Edge to a normal dependency to a dev dependency should be dev only?
Improve PackageLink::dev_only documentation to indicate that it's local context only
Aug 13, 2021
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Shouldn't an edge to any dependency to a dev dependency of a project be a
dev_only
edge? However, this API,guppy::graph::PackageLink::dev_only
, returnsfalse
for such an edge. In this way, I am not sure how this API is different fromguppy::graph::PackageLink::dev()::is_present()
.For example, for a test crate that has
guppy
as a dev dependency and no other dependency specified in the crate to make sureguppy
doesn't appear elsewhere in the dep-graph, below codeoutputs:
However,
guppy::graph::PackageLink::dev_only
in its description says:Below is how my test crate looked like:
The text was updated successfully, but these errors were encountered: