Skip to content

Replace AnyHashable#772

Draft
stevenzeck wants to merge 6 commits intoreadium:swift6from
stevenzeck:refactor/anyhashable
Draft

Replace AnyHashable#772
stevenzeck wants to merge 6 commits intoreadium:swift6from
stevenzeck:refactor/anyhashable

Conversation

@stevenzeck
Copy link
Copy Markdown
Contributor

@stevenzeck stevenzeck commented Apr 11, 2026

AnyHashable does not conform with Sendable. Replaced usages of it, including the introduction of AnySendableHashable: A new type-erased wrapper for values that conform to both Hashable and Sendable. It includes an .unwrap(as:) function for safe, generic extraction of the underlying value.

Public API Breaking Changes

  1. Pointer, TouchPointer, MousePointer: The id property type was changed from AnyHashable to PointerId.
  2. InputObservableToken: The id property type was changed from AnyHashable to UUID.
  3. Decoration: The userInfo dictionary was changed from [AnyHashable: AnyHashable] to [String: AnySendableHashable].
  4. Decoration.Style: The config property was changed from AnyHashable? to AnySendableHashable?.
  5. HTTPRequest: The userInfo dictionary was changed from [AnyHashable: AnyHashable] to [String: AnySendableHashable].
  6. ContentAttribute: The value property was changed from AnyHashable to AnySendableHashable.
  7. ContentAttributesHolder: The generic accessors (subscript<T>, attribute<T>, attributes<T>) were updated to restrict the generic.

Related to #758.

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