Skip to content

Commit 20c3cb8

Browse files
committed
tests
1 parent 34e4507 commit 20c3cb8

File tree

5 files changed

+503
-188
lines changed

5 files changed

+503
-188
lines changed

Sources/PackageGraph/PackageGraph+Loading.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,11 @@ private func createResolvedPackages(
558558
var duplicateTargetsAddressed = [String]()
559559
for potentiallyDuplicatePackage in potentiallyDuplicatePackages {
560560
// more than three target matches, or all targets in the package match
561-
if potentiallyDuplicatePackage.value.count > 3 || potentiallyDuplicatePackage.value.sorted() == potentiallyDuplicatePackage.key.package1.targets.map({ $0.name }).sorted() {
561+
if potentiallyDuplicatePackage.value.count > 3 ||
562+
(potentiallyDuplicatePackage.value.sorted() == potentiallyDuplicatePackage.key.package1.targets.map({ $0.name }).sorted()
563+
&&
564+
potentiallyDuplicatePackage.value.sorted() == potentiallyDuplicatePackage.key.package2.targets.map({ $0.name }).sorted())
565+
{
562566
switch (potentiallyDuplicatePackage.key.package1.identity.registry, potentiallyDuplicatePackage.key.package2.identity.registry) {
563567
case (.some(let registryIdentity), .none):
564568
observabilityScope.emit(

0 commit comments

Comments
 (0)