Skip to content

Commit 0169d06

Browse files
Resolve issues breaking Swift Wasm builds for sql-kit (#190)
* fix: Resolve issues breaking wasm build in sql-kit. Needed to require a newer version of swift-nio that supports wasm, and needed to narrow scope from the broad NIO dependency to the true dependency of just NIOCore. * fix: Don't require a bump in the minimum swift-nio version. Those compiling for wasm will need to find their own version of nio that compiles to wasm. In the near future, most latest versions of nio will compile to wasm, so this shouldn't be an issue. * refactor: Only elide the full NIO dependency if WASI is the target platform. Otherwise, leave exports and dependencies unchanged to minimize any disruption to downstream dependencies. * chore: Update minimum required version of swift-nio to 2.84.0, which is a release containing the latest wasm compilation fixes. * ci: Adds wasm build to CI. * chore: Clean out backwards compatibility provisions for NIO implicit dependencies. Latest testing indicates this won't be breaking to scope down to just NIOCore.
1 parent baf0d86 commit 0169d06

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
secrets: inherit
1616
with:
1717
with_android: true
18+
with_wasm: true
1819

1920
pure-fluent-integration-test:
2021
if: ${{ !(github.event.pull_request.draft || false) }}

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,14 @@ let package = Package(
1616
dependencies: [
1717
.package(url: "https://github.com/apple/swift-collections.git", from: "1.1.0"),
1818
.package(url: "https://github.com/apple/swift-log.git", from: "1.5.4"),
19-
.package(url: "https://github.com/apple/swift-nio.git", from: "2.65.0"),
19+
.package(url: "https://github.com/apple/swift-nio.git", from: "2.84.0"),
2020
],
2121
targets: [
2222
.target(
2323
name: "SQLKit",
2424
dependencies: [
2525
.product(name: "Collections", package: "swift-collections"),
2626
.product(name: "Logging", package: "swift-log"),
27-
.product(name: "NIO", package: "swift-nio"),
2827
.product(name: "NIOCore", package: "swift-nio"),
2928
],
3029
swiftSettings: swiftSettings

Sources/SQLKit/Exports.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
@_documentation(visibility: internal) @_exported import protocol NIO.EventLoop
2-
@_documentation(visibility: internal) @_exported import class NIO.EventLoopFuture
1+
@_documentation(visibility: internal) @_exported import protocol NIOCore.EventLoop
2+
@_documentation(visibility: internal) @_exported import class NIOCore.EventLoopFuture
33
@_documentation(visibility: internal) @_exported import struct Logging.Logger

0 commit comments

Comments
 (0)