Skip to content

1.1.0

Choose a tag to compare

@Lutzifer Lutzifer released this 17 Apr 09:02
· 11 commits to main since this release

Breaking Change

The macro signature has changed to fix a "Circular reference expanding freestanding macro" compiler error.

Before

#KMPStateSupport(
  (\MyState.name, String.self),
  (\MyState.count, Int.self)
)

After

#KMPStateSupport(MyState.self,
  ("name", String.self),
  ("count", Int.self)
)

Key paths are replaced with string literals for property names, and the root type is passed explicitly as a metatype. This avoids the circular dependency where the compiler needed to resolve key paths (requiring the type's member list) before expanding the macro that contributes to that member list.