Closed marinofelipe closed 3 years ago
Partially fixed on #12.
Won't fix
cases where the a target product dependency is declared by name and doesn't match the package dependency name.
That's because in that case only the product name is part of the JSON, which makes it impossible to relate to a package dependency.
Example: swift-composable-architecture's Package.swift dumped JSON has the following content:
{
"cLanguageStandard" : null,
"cxxLanguageStandard" : null,
"dependencies" : [
{
"name" : "combine-schedulers",
"requirement" : {
"range" : [
{
"lowerBound" : "0.1.0",
"upperBound" : "1.0.0"
}
]
},
"url" : "https:\/\/github.com\/pointfreeco\/combine-schedulers"
},
{
"name" : "swift-case-paths",
"requirement" : {
"range" : [
{
"lowerBound" : "0.1.1",
"upperBound" : "1.0.0"
}
]
},
"url" : "https:\/\/github.com\/pointfreeco\/swift-case-paths"
}
],
"name" : "swift-composable-architecture",
"pkgConfig" : null,
"platforms" : [
{
"options" : [
],
"platformName" : "ios",
"version" : "13.0"
},
{
"options" : [
],
"platformName" : "macos",
"version" : "10.15"
},
{
"options" : [
],
"platformName" : "tvos",
"version" : "13.0"
},
{
"options" : [
],
"platformName" : "watchos",
"version" : "6.0"
}
],
"products" : [
{
"name" : "ComposableArchitecture",
"targets" : [
"ComposableArchitecture"
],
"type" : {
"library" : [
"automatic"
]
}
}
],
"providers" : null,
"swiftLanguageVersions" : null,
"targets" : [
{
"dependencies" : [
{
"byName" : [
"CasePaths",
null
]
},
{
"byName" : [
"CombineSchedulers",
null
]
}
],
"exclude" : [
],
"name" : "ComposableArchitecture",
"resources" : [
],
"settings" : [
],
"type" : "regular"
},
{
"dependencies" : [
{
"byName" : [
"CombineSchedulers",
null
]
},
{
"byName" : [
"ComposableArchitecture",
null
]
}
],
"exclude" : [
],
"name" : "ComposableArchitectureTests",
"resources" : [
],
"settings" : [
],
"type" : "test"
}
],
"toolsVersion" : {
"_version" : "5.1.0"
}
}
Where ComposableArchitecture
target has two external dependencies by name, CombineSchedulers
and CasePaths
, and these dependencies doesn't' match/contain their package values on dependencies
, respectively "combine-schedulers"
and "swift-case-paths"
.
All other cases should be covered.
The dependencies provider report is not always accurate. There are cases where it reports that there are no third-party dependencies, when there actually are.
Example:
Results in:
When Package.swift contains third-party dependencies for ComposableArchitecture product.