Skip to content

Commit

Permalink
Bump Wasm CI to 6.0.2 (#262)
Browse files Browse the repository at this point in the history
* Bump Wasm CI to 6.0.2

* wasm fix
  • Loading branch information
stephencelis authored Jan 13, 2025
1 parent e289117 commit 15a98be
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,20 @@ jobs:
run: make test-${{ matrix.variation }}

wasm:
name: SwiftWasm
name: Wasm
runs-on: ubuntu-latest
strategy:
matrix:
include:
- toolchain: swift-DEVELOPMENT-SNAPSHOT-2024-09-12-a
swift-sdk: swift-wasm-DEVELOPMENT-SNAPSHOT-2024-09-12-a
checksum: 630ce23114580dfae029f832d8ccc8b1ba5136b7f915e82f8e405650e326b562
steps:
- uses: actions/checkout@v4
- uses: bytecodealliance/actions/wasmtime/setup@v1
- name: Install Swift and Swift SDK for WebAssembly
run: |
PREFIX=/opt/swift
SWIFT_TOOLCHAIN_TAG="${{ matrix.toolchain }}"
SWIFT_SDK_TAG="${{ matrix.swift-sdk }}"
set -ex
curl -f -o /tmp/swift.tar.gz "https://download.swift.org/development/ubuntu2204/$SWIFT_TOOLCHAIN_TAG/$SWIFT_TOOLCHAIN_TAG-ubuntu22.04.tar.gz"
curl -f -o /tmp/swift.tar.gz "https://download.swift.org/swift-6.0.2-release/ubuntu2204/swift-6.0.2-RELEASE/swift-6.0.2-RELEASE-ubuntu22.04.tar.gz"
sudo mkdir -p $PREFIX; sudo tar -xzf /tmp/swift.tar.gz -C $PREFIX --strip-component 1
$PREFIX/usr/bin/swift sdk install "https://github.com/swiftwasm/swift/releases/download/$SWIFT_SDK_TAG/$SWIFT_SDK_TAG-wasm32-unknown-wasi.artifactbundle.zip" --checksum ${{ matrix.checksum }}
$PREFIX/usr/bin/swift sdk install https://github.com/swiftwasm/swift/releases/download/swift-wasm-6.0.2-RELEASE/swift-wasm-6.0.2-RELEASE-wasm32-unknown-wasi.artifactbundle.zip --checksum 6ffedb055cb9956395d9f435d03d53ebe9f6a8d45106b979d1b7f53358e1dcb4
echo "$PREFIX/usr/bin" >> $GITHUB_PATH
- name: Build tests
run: swift build --swift-sdk wasm32-unknown-wasi --build-tests -Xlinker -z -Xlinker stack-size=$((1024 * 1024))
- name: Run tests
Expand Down
10 changes: 9 additions & 1 deletion Sources/SwiftNavigation/UIBinding.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import ConcurrencyExtras
import IssueReporting

#if canImport(Observation)
import Observation
#endif

/// A property wrapper type that can read and write an observable value.
///
/// Like SwiftUI's `Binding`, but works for UIKit, AppKit, and non-Apple platforms such as
Expand Down Expand Up @@ -560,7 +564,7 @@ private final class _UIBindingWeakRoot<Root: AnyObject, Value>: _UIBinding, @unc
}
}

private final class _UIBindingWrapper<Value>: Perceptible, Observable {
private final class _UIBindingWrapper<Value>: Perceptible {
var _value: Value
var value: Value {
get {
Expand All @@ -584,6 +588,10 @@ private final class _UIBindingWrapper<Value>: Perceptible, Observable {
}
}

#if canImport(Observation)
extension _UIBindingWrapper: Observable {}
#endif

private final class _UIBindingConstant<Value>: _UIBinding, @unchecked Sendable {
let value: Value
init(_ value: Value) {
Expand Down

0 comments on commit 15a98be

Please sign in to comment.