mozilla / uniffi-rs

a multi-language bindings generator for rust
https://mozilla.github.io/uniffi-rs/
Mozilla Public License 2.0
2.89k stars 232 forks source link

Swift: UniFFI API checksum mismatch #2321

Open yukibtc opened 1 week ago

yukibtc commented 1 week ago

Hi, adding new CI tests (clean environment, without any cache) for my SDK bindings I noticed this error:

UniFFI API checksum mismatch: try cleaning and rebuilding your project

This happen ONLY with Swift, not with Python or Kotlin. You can see the entire workflow here.

I'm using UniFFI v0.28 with proc-macros and futures. Any idea on how to fix this? Why does this happen only in Swift and not in Python or Kotlin?

Thanks

mhammond commented 15 hours ago

It sounds like you might be using stale generated swift code somehow - is it checked in to source control? All the checksum checks are in the generated swift code so you can see what the values are, and whether they change as your interface changes. We have some issues around checksums, but none where the checksum is plain wrong.