Skip to content

Fix WebAssembly logging and CGFloat compatibility - #2

Draft
kudit wants to merge 1 commit into
mainfrom
agent/fix-wasm-compatibility
Draft

Fix WebAssembly logging and CGFloat compatibility#2
kudit wants to merge 1 commit into
mainfrom
agent/fix-wasm-compatibility

Conversation

@kudit

@kudit kudit commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Purpose

Prepare Color for Compatibility 2.0 and fix the Swift Package Index WebAssembly issues seen in Color v1.5.2.

Current changes

  • Replaces the @MainActor mutable DebugLevel.colorLogging storage with a synchronous mutex-backed setting on Swift 6 so color parsing can read it from nonisolated code without forcing main { ... } solely for configuration access.
  • Keeps a compatibility fallback for older Swift toolchains.

Remaining before merge

  • After Compatibility 2.0.0 is released, raise Color's Compatibility dependency minimum to 2.0.0.
  • Remove now-unnecessary main { debug(...) } wrappers from CSS parsing where they existed only because colorLogging was MainActor-isolated.
  • Gate CGFloat: DoubleConvertible on real CoreGraphics availability so WASM's CGFloat = Double alias does not redundantly reconform Double.
  • Re-run the Swift 6.2 WebAssembly SPI build.

This stays draft until Compatibility 2.0.0 is available.

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