Skip to content

1.13.1 fails to build: extra argument 'uniffiClone' in call in generated LoroFFI.swift (uniffi 0.31 / xcframework skew) #34

Description

@jgautheron

Summary

1.13.1 (released today) fails to compile from a clean SwiftPM build with error: extra argument 'uniffiClone' in call throughout the generated Sources/Loro/LoroFFI.swift. 1.10.3 builds fine. The regression appears to come from the uniffi 0.31 upgrade (#31): the regenerated LoroFFI.swift bindings call a clone helper with a uniffiClone: argument that the shipped loroFFI.xcframework binary's scaffolding doesn't accept — a codegen/binary version skew.

Environment

  • loro-swift 1.13.1 (resolved via SwiftPM .package(url: ..., exact: "1.13.1"))
  • Swift 6.3.2 (Apple Swift version 6.3.2, swiftlang-6.3.2.1.108), macOS, swift build (SwiftPM, no Xcode project)
  • 1.10.3 with the identical setup compiles + links cleanly.

Repro

// Package.swift
.package(url: "https://github.com/loro-dev/loro-swift.git", exact: "1.13.1"),
// ...
.product(name: "Loro", package: "loro-swift"),
$ swift build
error: emit-module command failed with exit code 1 (use -v to see invocation)
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:898:22: error: extra argument 'uniffiClone' in call
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:1384:22: error: extra argument 'uniffiClone' in call
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:2103:22: error: extra argument 'uniffiClone' in call
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:2296:22: error: extra argument 'uniffiClone' in call
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:2804:22: error: extra argument 'uniffiClone' in call
.build/checkouts/loro-swift/Sources/Loro/LoroFFI.swift:2995:22: error: extra argument 'uniffiClone' in call
... (many more sites, all `extra argument 'uniffiClone' in call`)

Likely cause

PR #31 (feat: upgrade uniffi 0.31) regenerated LoroFFI.swift with a uniffi version whose generated call sites pass uniffiClone: into the FFI clone helper, but the prebuilt loroFFI.xcframework shipped with the 1.13.1 release was built against scaffolding without that parameter — so the generated Swift and the binary disagree. Regenerating the bindings against the exact binary that ships in the release (or rebuilding/republishing the xcframework to match the uniffi 0.31 codegen) should resolve it.

Workaround

Pin to exact: "1.10.3" (the last release that builds). Happy to share the full verbose build log or test a pre-release fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions