fix: ensure patches are different dependencies to enable unused

This commit is contained in:
alcolmenar 2023-08-09 09:54:57 -07:00
parent a07a12ac05
commit dde256fb93
No known key found for this signature in database
GPG Key ID: 2EFA25362C69DB88
3 changed files with 28 additions and 2 deletions

View File

@ -23,6 +23,13 @@ fn case() {
})
.url();
let git_project3 = git::new("bar3", |project| {
project
.file("Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("src/lib.rs", "")
})
.url();
let in_project = project()
.file(
"Cargo.toml",
@ -38,7 +45,7 @@ fn case() {
bar = {{ git = \"{git_project1}\" }}\n\
\n\
[patch.\"{git_project1}\"]\n\
bar = {{ git = \"{git_project2}\" }}\n\
bar = {{ git = \"{git_project3}\" }}\n\
\n\
[patch.crates-io]\n\
bar = {{ git = \"{git_project2}\" }}\n",

View File

@ -0,0 +1,19 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "bar"
version = "0.1.0"
source = "git+[..]"
[[package]]
name = "my-member"
version = "0.1.0"
dependencies = [
"bar",
]
[[package]]
name = "my-project"
version = "0.1.0"

View File

@ -1,3 +1,3 @@
Removing bar from dependencies
Updating git repository `[ROOTURL]/bar2`
Updating git repository `[ROOTURL]/bar[..]`
Updating `dummy-registry` index