Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spm transitive deps redux #44

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion PBXProjParser/Sources/PBXProjParser/XcodeProject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,12 @@ public struct XcodeProject {
/// - Parameter target: the target to get direct dependencies for
private func determineDirectDependencies(_ target: PBXNativeTarget) {
// Calculate the native target dependencies
logger.debug("Looking for direct dependencies for \(target.name)")
target.dependencies
.compactMap { model.object(forKey: $0, as: PBXTargetDependency.self) }
.compactMap { dependency in
if let target = dependency.target {
logger.debug("Direct dependency: \(target)")
return target
}

Expand All @@ -124,7 +126,7 @@ public struct XcodeProject {
/// Determines transitive dependencies by looping through direct dependencies and finding the items they depend on
/// - Parameter target: the target to find transitive dependencies for
private func determineTransitiveDependencies(_ target: PBXNativeTarget) {
logger.debug("Target: \(target.name). Deps: \(target.targetDependencies.map { $0.0 })")
logger.debug("Looking for transitive dependencies within Target: \(target.name). Deps: \(target.targetDependencies.map { $0.0 })")

var targetDependencies = target.targetDependencies.map { $0.1 }
var seen = Set<String>()
Expand Down
524 changes: 524 additions & 0 deletions TestAssets/transitive-project-and-components/ArchiveLog.txt

Large diffs are not rendered by default.

Loading
Loading