Skip to content

Releases: niktishakov/why-foundation

0.1.3

Choose a tag to compare

@niktishakov niktishakov released this 16 Oct 09:41
  • Adds a GitHub Action. After the step that sets up Swift:

    - uses: niktishakov/why-foundation@v0
      with:
        product: MyLibrary

    It downloads the prebuilt binary for the runner, verifies its checksum and fails the job when anything pulls in the full Foundation. It runs on Linux and macOS runners.

  • Prebuilt binaries for macOS (Apple silicon and Intel) and Linux (x86_64 and aarch64) are attached to the release.

0.1.2

Choose a tag to compare

@niktishakov niktishakov released this 16 Oct 09:05
  • Prebuilt binaries for macOS (Apple silicon and Intel) and Linux (x86_64 and aarch64) are attached to the release.
  • Fixes a hang in the statically linked Linux build: SwiftPM commands now run through posix_spawn instead of Foundation's Process.

0.1.1

Choose a tag to compare

@niktishakov niktishakov released this 15 Oct 20:12

Note: the Linux binaries attached to this release hang while reading the package graph. Use 0.1.2 instead.

  • Adds the WhyFoundationCore library product, so the analysis can be used from other tools.
  • Detects more APIs that are missing from FoundationEssentials: IndexSet, NSRange, FileHandle, Process, streams, the NS* classes and Error.localizedDescription, plus Measurement, units and SortDescriptor, which need ICU.
  • The README now documents installing with Mint and running the check in CI, and notes that "likely easy" is a hint rather than a guarantee.

0.1.0

Choose a tag to compare

@niktishakov niktishakov released this 15 Oct 19:57

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.