-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Problem
When creating a git override with cargo-overrides --git <uri> flag, a URL is provided for the git repository. If that git repository happens to contain a workspace, cargo-override will use the default package in that workspace.
For example, since sqlx defines a default package at its root, it'll be that crate that gets patched when cargo override --git https://github.com/launchbadge/sqlx is used. It is not currently possible to patch an of the other sqlx crates with --git, such as sqlx-core.
Crates like tokio and tracing, don't contain any default package in their workspace root, so aren't possible to patch at all. cargo override --git currently always fails for those.
Suggested solution
First we need to ensure that git patches of crates, without a default package, are possible with Cargo. I have not tested this so am not 100% certain it works.
Once that is done, we can add a -p <pkgid> flag that can be used with --git to specify the package we wish to use in the patch.