Closed PrismaPhonic closed 8 months ago
I get the same on other methods that take an &str
and return a Result
.
It looks like the other Result return errors are that WPError
does not conform to Error
(which makes me wonder if I need a special macro declaration on that type)
Closing in favor of https://github.com/chinedufn/swift-bridge/issues/150
For now you have to write this on the Swift side (assuming WPError
is thread safe, or never gets passed to another thread):
extension WPError: @unchecked Sendable {}
extension WPError: Error {}
I think a challenge there is that with my project setup I have a swift library get auto generated from my FFI crate which would overwrite that - but thank you for linking to the other issue
I'm not sure if I'm just doing something wrong but it appears that functions which return results aren't translating to Swift in a way that swift is happy with.
Do I need a special macro declaration on Error types?
Here's the error from swift:
Here's the declaration:
Here's the generated swift code:
I'm getting that error for every single function I've declared with a
Result
return.