[uniffi] Enum variants cannot match existing types
mgeisler opened this issue · comments
Problem:
Enum variants cannot have names that collide with other types: UniFFI will generate incorrect Kotlin code in that case. See mozilla/uniffi-rs#1853.
Solution:
We should rename our enum variants as needed until this is fixed upstream. It affects us in two cases at the moment:
mls-rs/mls-rs-uniffi/src/lib.rs
Lines 178 to 182 in de125ef
mls-rs/mls-rs-uniffi/src/lib.rs
Lines 189 to 190 in de125ef
In both cases, the generated code will recursively refer back to the enum variant instead of the top-level type.
We should ideally fix this upstream, but we'll probably just rename the variants for now.