Repository navigation
Conversation
`swift package describe` lists target dependencies without their platform conditions, so the planner walked targets SwiftPM never builds for iOS and planned their resource bundles. Read the conditions from `dump-package` and drop dependencies that exclude iOS. Fixes xtool-org#433
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What does this PR do?
Fixes #433. The planner no longer plans resource bundles for dependencies that are conditioned off iOS. For example, swift-crypto's BoringSSL targets are only built on non-Apple platforms.
swift package describelists target dependencies without their.when(platforms:)conditions. As a result, the planner walked targets that SwiftPM never builds for iOS, and packing then failed while copying their bundles. The planner now also runsswift package dump-packagefor each package and reads the conditions from it. It drops target and product dependencies whose platform list excludesiosbefore walking the graph. Those targets' own dependencies are skipped too.How was it tested?
PlannerTestscovering how thedump-packagedependency encodings (target,productwith package and module aliases,byName) are decoded and filtered.xtool devfails on macOS with packages using platform-conditional target dependencies (e.g. swift-crypto) #433 on macOS:swift-crypto_CryptoBoringWrapper.bundle couldn't be opened.repro.appwith onlyswift-crypto_Crypto.bundle.make lintreports 0 violations.Caveats:
main(which needs 6.4) doesn't compile there, because of an existing error inXTool.swift. I ran the new tests againstPackLibon its own, and ran the end-to-end check on the 1.24.0 tag.AI tool usage
How much of the code in this PR was AI-assisted? (check one)
Summary by CodeRabbit