Skip to content

Commit ed56f1e

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

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/cargo/sources/path.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ impl<'gctx> Source for RecursivePathSource<'gctx> {
325325
for s in self
326326
.packages
327327
.iter()
328+
.filter(|(pkg_id, _)| pkg_id.name() == dep.package_name())
328329
.map(|(pkg_id, pkgs)| {
329330
first_package(*pkg_id, pkgs, &mut self.warned_duplicate, self.gctx)
330331
})

tests/testsuite/git.rs

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

0 commit comments

Comments
 (0)