You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make uniffi_build optional in uniffi_macros (mozilla#2019)
* Add missing derive feature to serde dependency
The code built without this, but that seems to because of an accident
since the derive feature is not a default serde feature.
I noticed this when trying to make uniffi_build an optional
dependency of uniffi_macros — for some reason I don’t understand, this
would make `cargo build -p uniffi_macros` fail wtih:
error: cannot find derive macro `Deserialize` in this scope
--> uniffi_macros/src/util.rs:29:14
|
29 | #[derive(Deserialize)]
| ^^^^^^^^^^^
|
The error makes sense since the derive feature wasn’t enabled. What
does not make sense to me is that the error wasn’t triggered before.
* Make `uniffi_build` optional in `uniffi_macros`
As far as I can see, the dependency on uniffi_build is not needed for
the macros used by regular clients of UniFFI — it is only used to
create a convenience macro for the UI tests.
I named the new feature “trybuild” after the description of the macro.
Please let me know if you have preferences for a better name.
The overall goal here is to minimize the number of crates I need to
vendor to use UniFFI — I’m hoping to get away with checking in the
generated target language sources, so I’m currently focusing on the
dependencies in the rest of the code base.
0 commit comments