From fc068e95584acd41745e69b322d450bf42c399a9 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Tue, 14 Jul 2026 08:37:22 -0400 Subject: [PATCH 1/2] Add opt-in Skip Fuse support for Android transpilation Gated behind SKIP_FUSE=1 so normal builds are unaffected. Skip Lite (Kotlin transpilation) was attempted first but CoreModel's macros, retroactive Foundation conformances, and generic initializers aren't representable in Kotlin; Fuse compiles real Swift natively via the Swift Android SDK, so it builds CoreModel unmodified. --- Package.swift | 23 +++++++++++++++++++++++ Sources/CoreModel/Skip/skip.yml | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 Sources/CoreModel/Skip/skip.yml diff --git a/Package.swift b/Package.swift index ea68e0c..3ed1588 100644 --- a/Package.swift +++ b/Package.swift @@ -81,6 +81,29 @@ package.targets[package.targets.count - 1] = .testTarget( ] ) +// Skip (skip.dev) Fuse (native) transpilation support +let enableSkipFuse = environment["SKIP_FUSE"] == "1" +if enableSkipFuse { + // Skip requires higher minimum deployment targets + package.platforms = [ + .macOS(.v13), + .iOS(.v16), + .watchOS(.v9), + .tvOS(.v16), + .macCatalyst(.v16), + ] + package.dependencies += [ + .package(url: "https://source.skip.tools/skip.git", from: "1.9.0"), + .package(url: "https://source.skip.tools/skip-fuse.git", from: "1.0.0"), + ] + package.targets[0].dependencies += [ + .product(name: "SkipFuse", package: "skip-fuse") + ] + package.targets[0].plugins = (package.targets[0].plugins ?? []) + [ + .plugin(name: "skipstone", package: "skip") + ] +} + // SwiftPM plugins if buildDocs { package.dependencies += [ diff --git a/Sources/CoreModel/Skip/skip.yml b/Sources/CoreModel/Skip/skip.yml new file mode 100644 index 0000000..b00cedf --- /dev/null +++ b/Sources/CoreModel/Skip/skip.yml @@ -0,0 +1,2 @@ +skip: + mode: 'native' From 6e823fb5a2bc7c1bd354a9f49da0f1b50e588f60 Mon Sep 17 00:00:00 2001 From: Alsey Coleman Miller Date: Tue, 14 Jul 2026 08:48:01 -0400 Subject: [PATCH 2/2] Add CI job to build with Skip Fuse flag Mirrors the local verification: builds the CoreModel target with SKIP_FUSE=1 so the new opt-in Fuse dependency wiring in Package.swift is exercised on every push. --- .github/workflows/swift.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index d0a9a6b..9824b2d 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -39,6 +39,17 @@ jobs: - name: Test run: ${{ matrix.options }} swift test -c ${{ matrix.config }} + skip-fuse: + name: Skip Fuse (Android) + runs-on: macos-26 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Swift Version + run: swift --version + - name: Build (Skip Fuse) + run: SKIP_FUSE=1 swift build --target CoreModel + android: name: Android strategy: