-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type error in Kotlin generated code when using external types in async functions in 0.25.0 #1798
Comments
Doing some bisecting between that working commit and master, it seems to appear after #1767 was merged. |
bendk
added a commit
to bendk/uniffi-rs
that referenced
this issue
Oct 25, 2023
* Kotlin: fixed external types with async functions (mozilla#1798) * Swift: fixed compile error when multiple crates define async functions
I think the above PR should fix your issues, can you test with that? |
Yes, that linked PR seems to solve the issue for me, thanks! |
bendk
added a commit
to bendk/uniffi-rs
that referenced
this issue
Oct 26, 2023
* Kotlin: fixed external types with async functions (mozilla#1798) * Swift: fixed compile error when multiple crates define async functions
bendk
added a commit
that referenced
this issue
Oct 26, 2023
* Kotlin: fixed external types with async functions (#1798) * Swift: fixed compile error when multiple crates define async functions
Great, that code is just merged. We should do a |
bendk
added a commit
to bendk/uniffi-rs
that referenced
this issue
Oct 27, 2023
* Kotlin: fixed external types with async functions (mozilla#1798) * Swift: fixed compile error when multiple crates define async functions
bendk
added a commit
that referenced
this issue
Oct 27, 2023
* Kotlin: fixed external types with async functions (#1798) * Swift: fixed compile error when multiple crates define async functions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what information can help with this, or the exact cause of the error, but I have some reproduction project here:
https://github.com/dani-garcia/uniffi_025_repro
The project is structured as such:
chrono::DateTime
inner
and just reexports it's functions and external types (withffi_converter_forward
).Note that the only function that these two crates expose is
get_time
.With both functions defined as sync, the generated code works fine, but when we change the function in
outer
toasync fn
, we get the following error in the generated kotlin code:Code generated for the function without
async
:Code generated for the function with
async
:The function in outer just calls the inner function:
This same code used to work in the past, at least up to commit 53d5ac7, which is the one we were using while the proc-macro changes where unreleased. Now when using 0.25.0 it's showing the error mentioned above.
Let me know if you need any extra details.
The text was updated successfully, but these errors were encountered: