Skip to content

Commit af12c74

Browse files
committed
fix(source): Don't warn about unreferenced duplicate packages
Fixes #10752
1 parent df66daf commit af12c74

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/cargo/sources/path.rs

+1
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ impl<'gctx> Source for RecursivePathSource<'gctx> {
323323
for s in self
324324
.packages
325325
.iter()
326+
.filter(|(pkg_id, _)| pkg_id.name() == dep.package_name())
326327
.map(|(pkg_id, pkgs)| {
327328
first_package(*pkg_id, pkgs, &mut self.warned_duplicate, self.gctx)
328329
})

tests/testsuite/git.rs

-4
Original file line numberDiff line numberDiff line change
@@ -1283,10 +1283,6 @@ expected `.`, `]`
12831283
2 | [package
12841284
| ^
12851285
|
1286-
[WARNING] skipping duplicate package `duplicate v0.5.0 ([ROOTURL]/dep#[..])`:
1287-
[ROOT]/home/.cargo/git/checkouts/dep-[HASH]/[..]/duplicate2/Cargo.toml
1288-
in favor of [ROOT]/home/.cargo/git/checkouts/dep-[HASH]/[..]/duplicate1/Cargo.toml
1289-
12901286
[FINISHED] `dev` profile [unoptimized + debuginfo] target(s) in [ELAPSED]s
12911287
[RUNNING] `target/debug/foo[EXE]`
12921288

0 commit comments

Comments
 (0)