pointfreeco / swift-composable-architecture

A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
https://www.pointfree.co/collections/composable-architecture
MIT License
12.35k stars 1.44k forks source link

Branch observation-beta-shared-state-syncups not compiling for watchOS #2717

Closed Malauch closed 9 months ago

Malauch commented 9 months ago

Description

I was checking new shared state changes on observation-beta-shared-state-syncups branch and noticed that here is a problem which prevents compiling for watchOS: https://github.com/pointfreeco/swift-composable-architecture/blob/43f0c25e7fc7185b414d752bec85973b7d682a1c/Sources/ComposableArchitecture/Observation/SharedState/SharedPersistence/FileStorage.swift#L4-L10

UIKit can be imported on watchOS but UIApplication is not available. Unfortunately it is not easy fix as adding additional type alias for WKApplication. It was added in watchOS 7 and TCA supports watchOS 6. I know that branch is work in progress but decided to share this just in case.

Checklist

Expected behavior

No response

Actual behavior

No response

Steps to reproduce

No response

The Composable Architecture version information

43f0c25e7fc7185b414d752bec85973b7d682a1c

Destination operating system

watchOS 10

Xcode version information

Version 15.1 (15C65)

Swift Compiler version information

No response

mbrandonw commented 9 months ago

Hi @Malauch, that branch is a non-released and non-publicized experimental branch. Some of those findings may never see the light of day. We may get around to fixing the watchOS problem, but no promises. And you are free to open a PR against the branch to fix the problem.

Since this is not an issue with the currently released library, I am going to convert this to a discussion.