Skip to content

Foundation is the Swift SDK's on Android and the web: Isomer's Swift SDKs (0.56) - #232

Open
logan-shire-agent[bot] wants to merge 4 commits into
mainfrom
hermetic-toolchains
Open

logan-shire-agent[bot] wants to merge 4 commits into
mainfrom
hermetic-toolchains

Conversation

@logan-shire-agent

Copy link
Copy Markdown
Contributor

Foundation on Android and the web becomes the Swift SDK's: Isomer's Swift SDKs (AttilaTheFun/isomer_hermetic_toolchains, branch isomer-6.4.2) are swift.org's 6.4.2 SDKs with corelibs Foundation taken out and Isomer's Foundation family put in, so every import Foundation there (an app's, a package's, a module's) is Isomer's with no @isomer//:foundation edge. docs/hermetic_toolchains.md has the design; README's "Isomer's Swift SDKs" and "Upgrading isomer" have what a consumer writes.

  • Consumers paste one snippet a platform into their swift block: swift.android_sdk(url = …, sha256 = …) and/or swift.wasm_sdk(url = …, sha256 = …), the plain SDK, or the -i18n one (FoundationInternationalization and ICU) for an app that formats dates or numbers. An app that builds for Android alone registers no wasm SDK.
  • Package.swift: no Foundation, FoundationNetworking or IsomerFoundation targets and no swift-foundation dependency. CoreGraphics and Combine stay, for Linux and Windows only (corelibs Foundation there).
  • @isomer//:foundation and @isomer//:isomer_foundation are empty dependencies on Android and the web, so existing BUILD files keep working. Foundation's configure_package(target_deps = …) entries are gone (isomer's and the examples').
  • foundation/'s sources moved to the toolchains repository's Isomer/Sources. foundation/ keeps the build settings, one_configuration and Foundation's tests, which build against the SDK's Foundation. FileWrapper.swift moves to shared/swift_ui_corelibs for Linux's and Windows' SwiftUI.
  • --@isomer//foundation:internationalization stays. On Android and the web it now checks that the -i18n SDK is registered: a build that sets it with the plain SDK fails and names the SDK to use.
  • SDK registrations: isomer's own module registers the -i18n SDKs, so the internationalization and ICU-trimming checks run; the examples register the plain SDKs.
  • rules_swift 4.3.0.isomer.1 (rules_swift 4.3.0.isomer.1 bazel_registry#63): upstream 4.3.0, which has swift.android_sdk(url = …) (rules_swift#2012), with #1860, #1990, #1995 and #2000 as patches. 4.3.0 builds Android and wasm without explicit modules (#1999), and their implicitly built Clang modules then conflict in the shared module cache ("module '_Builtin_stddef' is defined in both"): .bazelrc and examples/.bazelrc turn swift.use_global_module_cache off until rules_swift does that for those toolchains.
  • tools/foundation/check_link.py is removed (there is one Foundation to link). tools/parity reads the SDK's Foundation family on wasm.

Checked in leased containers, with the SDKs built at isomer_hermetic_toolchains 42fd9591 (CI's plain builds there match byte for byte), passed by --distdir:

  • isomer's module on the -i18n SDKs: Foundation's checks, internationalization and ICU trimmed to three languages, Combine, OSLog, the Metal translator and the core's tests;
  • the examples on the plain SDKs: the headless and remote tests, the web Storybook in headless Chrome, the Android and web checks, and the Android Storybook on an emulator with its stories drawn;
  • one Foundation, Isomer's, in the web Storybook's reactor and the Android Storybook's library;
  • the examples with only the Android SDK registered build the Android Storybook;
  • --@isomer//foundation:internationalization with the plain SDK fails, naming the -i18n one.

Draft until the SDKs' release (isomer-6.4.2.1) is published and the registry has 4.3.0.isomer.1: CI downloads both, so it can't pass before then.

…SDKs registered by URL, foundation/'s sources moved to isomer_hermetic_toolchains (docs/hermetic_toolchains.md)

Isomer's Swift SDKs (AttilaTheFun/isomer_hermetic_toolchains, isomer-6.4.2)
are swift.org's 6.4.2 Android and WebAssembly SDKs with corelibs Foundation
taken out and Isomer's Foundation, FoundationNetworking, IsomerFoundation,
CoreGraphics and Combine put in, plain or -i18n (FoundationInternationalization
and the SDK's ICU), so every `import Foundation` there is Isomer's with no
dependency declared.

- Package.swift: no Foundation, FoundationNetworking or IsomerFoundation
  targets and no swift-foundation dependency; CoreGraphics and Combine for
  Linux and Windows only.
- @isomer//:foundation and :isomer_foundation empty on Android and the web;
  //core_graphics and //frameworks/combine the SDK's there. Foundation's
  configure_package target_deps gone (isomer's and the examples').
- --@isomer//foundation:internationalization checks that the -i18n SDK is
  registered.
- isomer registers the -i18n SDKs (Foundation's tests and ICU's trimming
  run against them), the examples the plain ones; rules_swift
  4.2.2.isomer.4 for swift.android_sdk(url = ...).
- FileWrapper.swift to shared/swift_ui_corelibs; tools/foundation/check_link.py
  removed; tools/parity reads the SDK's Foundation family.
- README: "Isomer's Swift SDKs", one snippet a platform, and the Upgrading
  notes.
…990, #1995 and #2000); the SDKs' checksums at isomer_hermetic_toolchains 42fd9591; the single-object lesson in docs/hermetic_toolchains.md
…droid and wasm without explicit modules, and the shared cache then holds two _Builtin_stddef)
@logan-shire-agent
logan-shire-agent Bot marked this pull request as ready for review November 16, 2026 23:11

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants