Skip to content

Commit 877f9ef

Browse files
authored
Merge pull request #5 from PureSwift/skip-fuse-android-support
Add opt-in Skip Fuse support for Android transpilation
2 parents 5b6c22e + eaff665 commit 877f9ef

27 files changed

Lines changed: 158 additions & 91 deletions

‎.github/workflows/swift.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ jobs:
3838
- name: Test
3939
run: swift test -c ${{ matrix.config }}
4040

41+
skip-fuse:
42+
name: Skip Fuse (Android)
43+
runs-on: macos-26
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
- name: Swift Version
48+
run: swift --version
49+
- name: Build (Skip Fuse)
50+
run: SKIP_FUSE=1 swift build --target CoreModelSQLite
51+
4152
android:
4253
name: Android
4354
runs-on: macos-15

‎Package.swift‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ let package = Package(
3434
dependencies: [
3535
.package(
3636
url: "https://github.com/PureSwift/CoreModel",
37-
from: "2.7.1"
37+
from: "2.7.2"
3838
),
3939
sqliteDependency
4040
],
@@ -58,3 +58,26 @@ let package = Package(
5858
)
5959
]
6060
)
61+
62+
// Skip (skip.dev) Fuse (native) transpilation support
63+
let enableSkipFuse = ProcessInfo.processInfo.environment["SKIP_FUSE"] == "1"
64+
if enableSkipFuse {
65+
// Skip requires higher minimum deployment targets
66+
package.platforms = [
67+
.macOS(.v13),
68+
.iOS(.v16),
69+
.watchOS(.v9),
70+
.tvOS(.v16),
71+
.macCatalyst(.v16),
72+
]
73+
package.dependencies += [
74+
.package(url: "https://source.skip.tools/skip.git", from: "1.9.0"),
75+
.package(url: "https://source.skip.tools/skip-fuse.git", from: "1.0.0"),
76+
]
77+
package.targets[0].dependencies += [
78+
.product(name: "SkipFuse", package: "skip-fuse")
79+
]
80+
package.targets[0].plugins = (package.targets[0].plugins ?? []) + [
81+
.plugin(name: "skipstone", package: "skip")
82+
]
83+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
skip:
2+
mode: 'native'

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/AmenityType.swift‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Created by Alsey Coleman Miller on 10/3/25.
66
//
77

8+
import CoreModel
9+
810
/// ProfessionalDriver Amenity Type
911
public enum AmenityType: String, Codable, CaseIterable, Sendable {
1012

@@ -26,3 +28,7 @@ public enum AmenityType: String, Codable, CaseIterable, Sendable {
2628
/// Clinic
2729
case clinic
2830
}
31+
32+
// MARK: - AttributeCodable
33+
34+
extension AmenityType: AttributeCodable {}

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/Date/Month.swift‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Foundation
9+
import CoreModel
910

1011
public extension Date {
1112

@@ -64,6 +65,10 @@ public extension Date.Month {
6465
}
6566
}
6667

68+
// MARK: - AttributeCodable
69+
70+
extension Date.Month: AttributeCodable {}
71+
6772
// MARK: - CustomStringConvertible
6873

6974
extension Date.Month: CustomStringConvertible {

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/Date/Weekday.swift‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Foundation
9+
import CoreModel
910

1011
public extension Date {
1112

@@ -27,6 +28,10 @@ public extension Date {
2728
}
2829
}
2930

31+
// MARK: - AttributeCodable
32+
33+
extension Date.Weekday: AttributeCodable {}
34+
3035
// MARK: - Comparable
3136

3237
extension Date.Weekday: Comparable {

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/Device.swift‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Foundation
9+
import CoreModel
910

1011
#if canImport(UIKit)
1112
import UIKit
@@ -84,6 +85,10 @@ extension Device.ID: ExpressibleByStringLiteral {
8485
}
8586
}
8687

88+
// MARK: - AttributeCodable
89+
90+
extension Device.ID: AttributeCodable {}
91+
8792
// MARK: - CustomStringConvertible
8893

8994
extension Device.ID: CustomStringConvertible, CustomDebugStringConvertible {

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/DriverID.swift‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Created by Alsey Coleman Miller on 5/6/25.
66
//
77

8+
import CoreModel
9+
810
/// Driver ID
911
public struct DriverID: RawRepresentable, Codable, Equatable, Hashable, Sendable {
1012

@@ -32,6 +34,10 @@ extension DriverID: ExpressibleByStringLiteral {
3234
}
3335
}
3436

37+
// MARK: - AttributeCodable
38+
39+
extension DriverID: AttributeCodable {}
40+
3541
// MARK: - CustomStringConvertible
3642

3743
extension DriverID: CustomStringConvertible, CustomDebugStringConvertible {

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/DriverType.swift‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// Created by Alsey Coleman Miller on 4/15/25.
66
//
77

8+
import CoreModel
9+
810
/// ProfessionalDriver Driver Type
911
public enum DriverType: String, Codable, CaseIterable, Sendable {
1012

@@ -18,6 +20,12 @@ public enum DriverType: String, Codable, CaseIterable, Sendable {
1820
case fleet = "TF"
1921
}
2022

23+
// MARK: - AttributeCodable
24+
25+
extension DriverType: AttributeCodable {}
26+
27+
// MARK: - CustomStringConvertible
28+
2129
extension DriverType: CustomStringConvertible {
2230
public var description: String {
2331
switch self {

‎Tests/CoreModelSQLiteTests/ProfessionalDriver/Model/EmailAddress.swift‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
//
77

88
import Foundation
9+
import CoreModel
910
#if canImport(RegexBuilder)
1011
import RegexBuilder
1112
#endif
@@ -64,6 +65,10 @@ internal extension EmailAddress {
6465
#endif
6566
}
6667

68+
// MARK: - AttributeCodable
69+
70+
extension EmailAddress: AttributeCodable {}
71+
6772
// MARK: - CustomStringConvertible
6873

6974
extension EmailAddress: CustomStringConvertible, CustomDebugStringConvertible {

0 commit comments

Comments
 (0)