Ability to test against registry dependencies, instead of path dependencies #14429
Labels
A-dependency-resolution
Area: dependency resolution and the resolver
C-feature-request
Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`
Command-package
Command-test
S-triage
Status: This issue is waiting on initial triage.
Problem
I have a monorepo with multiple Rust crates that depends on one another with both a path and version dependency. An example for a line in
Cargo.toml
:The behaviour of cargo to ignore the
version
during development and ignore thepath
during publish or package is amazing! When I runcargo package
the crate it built withmy_crate_dep
fromcrates.io
, and not my local dependency.I would also like to
cargo test
withmy_crate_dep
fromcrates.io
rather than local, in addition to the build.Proposed Solution
One of the following will provide what I need:
cargo test
indicating to ignore path/git dependencies, maybe along the lines of--force-published-deps
.cargo package
to run testsNotes
Actually I think such flags can be useful in many sub commands of cargo, maybe we should consider a wide option
The text was updated successfully, but these errors were encountered: