Skip to content

0.1.0

Choose a tag to compare

@niktishakov niktishakov released this 15 Oct 19:57
· 21 commits to main since this release

First release.

why-foundation lists the targets in your dependency graph that pull the full Foundation, and with it ICU, into an Android or Linux Swift build, with the dependency path that leads there.

  • Evaluates #if conditions, package traits, swiftSettings defines and .when(platforms:) / .when(traits:) for the target platform.
  • Reports targets that import Foundation, FoundationNetworking, FoundationXML or FoundationInternationalization, and targets that declare resources, since SwiftPM's generated resource accessor imports Foundation.
  • Sorts findings into targets that look easy to switch to FoundationEssentials, targets that use APIs only available in full Foundation, and Apple-only targets.
  • Works on Swift packages and on the package dependencies of Xcode projects.
  • Exits with code 1 when anything pulls in Foundation, for use in CI.

Install with mint install niktishakov/why-foundation, or see the README.