diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08cb0affd..11cb4829a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,19 +91,19 @@ jobs: - name: Run tests run: wasmtime --dir . .build/debug/swift-navigationPackageTests.wasm - windows: - name: Windows - strategy: - matrix: - os: [windows-latest] - config: ['debug', 'release'] - fail-fast: false - runs-on: ${{ matrix.os }} - steps: - - uses: compnerd/gha-setup-swift@main - with: - branch: swift-5.10-release - tag: 5.10-RELEASE - - uses: actions/checkout@v4 - - name: Build - run: swift build -c ${{ matrix.config }} + # windows: + # name: Windows + # strategy: + # matrix: + # os: [windows-latest] + # config: ['debug', 'release'] + # fail-fast: false + # runs-on: ${{ matrix.os }} + # steps: + # - uses: compnerd/gha-setup-swift@main + # with: + # branch: swift-5.10-release + # tag: 5.10-RELEASE + # - uses: actions/checkout@v4 + # - name: Build + # run: swift build -c ${{ matrix.config }} diff --git a/Sources/SwiftNavigation/UIBinding.swift b/Sources/SwiftNavigation/UIBinding.swift index bc67d619e..0961b1826 100644 --- a/Sources/SwiftNavigation/UIBinding.swift +++ b/Sources/SwiftNavigation/UIBinding.swift @@ -202,6 +202,25 @@ public struct UIBinding: Sendable { ) } + @available( + *, + deprecated, + message: + """ + A '@UIBinding' must be initialized with a value, not an observable reference. Use '@UIBindable', instead. + """, + renamed: "UIBindable.init" + ) + public init(wrappedValue value: Value) where Value: AnyObject { + self.init( + location: _UIBindingAppendKeyPath( + base: _UIBindingStrongRoot(root: _UIBindingWrapper(value)), + keyPath: \.value + ), + transaction: UITransaction() + ) + } + /// Creates a binding from the value of another binding. /// /// You don't call this initializer directly. Instead, Swift calls it for you when you use a