Skip to content

Conversation

@Kyle-Ye
Copy link
Contributor

@Kyle-Ye Kyle-Ye commented Aug 30, 2025

Summary

  • Expose _ThreadLocal.value property as public API under the @_spi(OpenSwiftUI) annotation
  • This allows the OpenSwiftUI framework to access the thread-local storage value while keeping it hidden from general public API

Changes

  • Added @_spi(OpenSwiftUI) and public modifiers to the value property in both conditional compilation blocks:
    • The OPENOBSERVATION_SWIFT_TOOLCHAIN_SUPPORTED version
    • The fallback platform-specific implementation

Test Plan

  • Verify that the code compiles successfully
  • Confirm that OpenSwiftUI can now access _ThreadLocal.value when importing with @_spi(OpenSwiftUI)
  • Ensure the property remains hidden from regular public API consumers

Expose the value property of _ThreadLocal as public API under the OpenSwiftUI SPI to allow
access from the OpenSwiftUI framework while keeping it hidden from general public API.
@Kyle-Ye Kyle-Ye force-pushed the public-threadlocal-value branch from f4f9dae to 7b054fd Compare August 30, 2025 15:50
@Kyle-Ye Kyle-Ye merged commit 1eb29e5 into main Aug 30, 2025
2 checks passed
@Kyle-Ye Kyle-Ye deleted the public-threadlocal-value branch August 30, 2025 15:54
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.

2 participants