Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bug, do not merge. I opened it as a DRAFT PR just to be able to show this bug to @bendk. I'm using Bens fork for UniFFI:
N.B. Kotlin bug only, works in Swift! Bug due to in Kotlin there are many different RustBuffers, one per crate
Workspace setup
This is the setup to reproduce the bug:
Uuid
common
crate which does makesUuid
UniFFI compatible usingcustom_type
farm
crate which declaresstruct BatchID(Uuid); remote_type!(Uuid, common); custom_type!(BatchID, Uuid, {
pie
crate which declaresstruct PieBatchID(BatchID); remote_type!(BatchID, farm); custom_type!(PieBatchID, BatchID, {
common
In
common
crate:farm
In
farm
crate:pie
In
pie
crate:This setup works for Swift bindgen tests.
But when running a Kotlin bindgen tests it does not compile. here is the generated non compiling Kotlin code in question:
I guess what is missing is some kind of conversion between the
RustBuffers
of different packages? Or hmm I'm actually not in need of the different crates of my Workspace, the plan is not to vendor each crate individually, the only purpose for me of the Workspace is to decrease compilation time.