Skip to content

Type SkyLight bridge calls and drop the SkyLight dlopen - #4

Merged
KishanBagaria merged 1 commit into
mainfrom
typed-space-bridge
Nov 24, 2026
Merged

KishanBagaria merged 1 commit into
mainfrom
typed-space-bridge

Conversation

@KishanBagaria

Copy link
Copy Markdown
Collaborator
  • Drops the SkyLight dlopen. CoreGraphics already links and loads SkyLight, and NSClassFromString finds the bridge class without the dlopen.
  • Declares the bridge and operation methods in one private protocol. The calls are now ordinary message sends that the compiler type-checks, replacing NSSelectorFromString plus hand-cast objc_msgSend.
  • The four async writes share one helper that owns the @try.

The classes are still looked up by name. The bridge class isn't exported, and linking the operation classes would need the private-framework search path, which SwiftPM rejects for versioned dependencies. A missing class or method still returns NO or 0.

No public API change. Tested on macOS 27.2.1:

  • A live harness ran create, destroy, add, remove and move on our own window and another process's window, and every operation worked.
  • Passing a non-bridge object returns NO or 0 without crashing.
  • platform-imessage's Space and coordinator tests and the live parking-Space smoke test pass against this branch.

CoreGraphics already loads SkyLight, so the dlopen was dead. Bridge
methods are now declared in a private protocol instead of being called
through NSSelectorFromString and hand-cast objc_msgSend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KishanBagaria
KishanBagaria merged commit 378c801 into main Nov 24, 2026
2 checks passed
@KishanBagaria
KishanBagaria deleted the typed-space-bridge branch November 24, 2026 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant