You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve diagnostics when a product declared in a package is also used as a dependency (#3594)
* Resolves rdar://71912826 ([SR-13913]: Library product name must match target name??).
* Checks if a target dependency includes a product declared in the same package, checks the targets of that product, and throws an error if invalid with improved diagnostics.
return"product '\(dependencyProductName)' required by package '\(package)' target '\(targetName)' \(dependencyPackageName.map{"not found in package '\($0)'"}??"not found")."
return"product '\(dependencyProductName)' is declared in the same package '\(package)' and can't be used as a dependency for target '\(targetName)'."
198
+
}else{
199
+
return"product '\(dependencyProductName)' required by package '\(package)' target '\(targetName)' \(dependencyPackageName.map{"not found in package '\($0)'"}??"not found")."
result.check(diagnostic:"product 'Foo' is declared in the same package 'foo' and can't be used as a dependency for target 'FooTests'.", behavior:.error, location:"'Foo' /Foo")
0 commit comments