Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
20 changes: 17 additions & 3 deletions PIF/Sources/PIFSupport/PIF.swift
Original file line number Diff line number Diff line change
Expand Up @@ -378,22 +378,36 @@ public enum PIF {

/// Represents a dependency on another target (identified by its PIF GUID).
public struct TargetDependency: Decodable {
/// Name of dependency
public let name: String

/// Identifier of depended-upon target.
public let targetGUID: String

/// The platform filters for this target dependency.
public let platformFilters: [PlatformFilter]

private enum CodingKeys: CodingKey {
case guid, platformFilters
case name, guid, platformFilters
}

public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)

targetGUID = try container.decode(String.self, forKey: .guid)
name = try container.decodeIfPresent(String.self, forKey: .name) ?? "Unknown"
do {
targetGUID = try container.decode(String.self, forKey: .guid)
Comment thread
davdres marked this conversation as resolved.
Outdated
} catch {
targetGUID = ""
logger.info(" ------------------------------------------------------------------------------------------")
logger.info(" Error: dependency \(name) is missing a guid and will not be resolved!\n")
logger.info(" For more context rerun with --log-level=trace.")
logger.info(" Be aware the this may generate a LOT of output.")
logger.info(" This is an error in your project metadata you may want to report this to Apple.")
logger.info(" ------------------------------------------------------------------------------------------")
}
platformFilters = try container.decodeIfPresent([PlatformFilter].self, forKey: .platformFilters) ?? []
logger.trace("---> Decoded TargetDependency: \(targetGUID)")
logger.trace("---> Decoded TargetDependency: \(name) \(targetGUID)")
}
}

Expand Down
5 changes: 3 additions & 2 deletions Sources/GenIR/Versions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
// Created by Thomas Hedderwick on 12/09/2022.
//
// History:
// 2025-nn-nn - 1.0.1 -- Use info logging to allow user to monitor progress.
// 2026-nn-nn - 1.0.2 -- SSAST-11722 don't fail on TargetDependency decode failure.
// 2026-01-08 - 1.0.1 -- Use info logging to allow user to monitor progress.
// 2025-12-01 - 1.0.0 -- Don't chase through Dynamic Dependencies
// 2025-09-19 - 0.5.4 -- Update release doc; warn multiple builds; capture debug data
// 2025-04-18 - 0.5.3 -- PIF Tracing; log unique compiler commands
Expand All @@ -15,5 +16,5 @@
import Foundation

enum Versions {
static let version = "1.0.1"
static let version = "1.0.2"
}
Loading