Skip to content

feat: Add swift wasm CI targets to DataLoader #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

scottmarchant
Copy link

@scottmarchant scottmarchant commented Jun 23, 2025

NOTE: This is in DRAFT until required supporting changes are merged in swift-nio and GraphQLSwift/ci

Change summary

Added swift wasm as a CI target, to help prevent future breakages to swift wasm builds in DataLoader

Details

  • Added ci stage that checks wasm compilation.
  • Temporarily pointing to a branch of swift-nio to verify wasm compilation, as swift-nio/NIOCore is currently broken. The swift-nio version will be bumped before merging this.
  • Bump swift version from 5.8 to 5.10.0, which is the new minimum for the latest swift-nio dependency.
  • Add wasi 0.1 build status badge to README.md.

Notes

  • Because the build status badge uses an unmerged workflow (.github/workflows/wasm.yaml), it can't be tested until this PR is merged. Some follow-on work may be needed after merging to ensure proper badge functionality.
  • This PR is part of a larger effort by PassiveLogic to add wasm support to many popular repositories.

PR Dependencies

The following PR's must be merged before this PR can be merged:

Testing done

Verified new github workflow builds, once required upstream dependencies are patched in swift-nio

See https://github.com/PassiveLogic/DataLoader/actions/runs/15833601501/job/44631947127?pr=1

Remaining work

  • Update this PR after swift-nio wasm build is merged and released
  • After merging, verify badge works as expected. As noted, this can't be tested until after merging. Submit patch for new badge if needed.

@@ -13,7 +13,13 @@ let package = Package(
dependencies: [
.package(url: "https://github.com/apple/swift-algorithms.git", from: "1.0.0"),
.package(url: "https://github.com/adam-fowler/async-collections", from: "0.0.1"),
.package(url: "https://github.com/apple/swift-nio.git", from: "2.0.0"),
Copy link
Author

@scottmarchant scottmarchant Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should NOT be merged until apple/swift-nio#3271 is merged and released.

This needs updated with the latest swift nio version once 3271 is merged and in a release.

Copy link
Author

@scottmarchant scottmarchant Jun 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The nio PR is merged now, but still need a new swift-nio release containing the change. Until then, can't have a new minimum version with correct Package.resolved values.

@scottmarchant scottmarchant changed the title feat: Add swift wasm to ci to DataLoader feat: Add swift wasm CI targets to DataLoader Jun 23, 2025
@@ -1,4 +1,4 @@
// swift-tools-version:5.8
// swift-tools-version:5.10.0
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, this is likely a breaking change for users of this repository.

@scottmarchant scottmarchant marked this pull request as ready for review June 24, 2025 20:34
@scottmarchant
Copy link
Author

The error for swift 5.8 should pass now that the ci change is merged.

error: 'dataloader': package 'dataloader' is using Swift tools version 5.10.0 but the installed version is 5.8.1

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.

1 participant