Closed pierre-wehbe closed 2 months ago
@rogerneel ^
I assume you mean 0.25, etc. (there's no v2.x
yet)
I cannot reproduce this locally. Code inline below.
Tested with 0.25, 0.26 and 0.27. All compiles, targetting the host architecture.
The proc macros correctly use ::core::*
. Given that's ... the core library it should exist.
If you can providing the failing code in a git repository would help us debug this further.
@badboy thanks for looking into it, I'll try building a repo that reproduces the issue.
I failed to mention some information:
...
[dependencies]
uniffi = { version = "0.27.2", features = [ "cli" ] }
shared = { path = "../rust/shared" }
core = { path = "../rust/core" }
[build-dependencies] uniffi = { version = "0.27.2", features = [ "build" ] } ...
@badboy Indeed, renaming our local core lib to anything else works...
There are some places we use core::
where using ::core::
would probably solve this - eg, here
@mhammond That was my thought as well, I've unblocked us by renaming our current library, but I bet lots of repos would have a "core" package internal to them, would be nice to prioritize this issue
There are some places we use
core::
where using::core::
would probably solve this - eg, here
Ah, somehow that is the one instance I overlooked. Yes, changing that to ::core
should likely fix this issue.
@mhammond That was my thought as well, I've unblocked us by renaming our current library, but I bet lots of repos would have a "core" package internal to them, would be nice to prioritize this issue
I kinda doubt that many people name their crate core
. Probably a lot of other crates would use core::
and thus naming an internal crate core
has high potential of more breakage. Nonetheless we should of course fix uniffi here.
Env:
nightly-aarch64-apple-darwin - Up to date : 1.80.0-nightly (867900499 2024-05-23) uniffi 0.27.2
The following works
Adding the following fails:
The error is:
This is the content of example.uniffi.rs:69:1