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
Stop supporting typedef extern, [ExternalInterface=...] in UDL etc. (#2355)
This consolidates how external types are expressed in UDL. Instead of
```
[External="crate_name"]
typedef extern MyEnum
[ExternalInterface="crate_name"]
typedef extern MyInterface
```
you would use:
```
[External="crate_name"]
typedef enum MyEnum
[External="crate_name"]
typedef interface MyInterface
```
See the docs and upgrading notes in this commit for more.
The `custom_type!` macro is more flexible than the old system - eg, the closures can be omitted in many cases where `From` and `Into` exist.
34
40
See the [Custom Types](./types/custom_types.md) for details.
41
+
42
+
## External Types
43
+
44
+
External types can no longer be described in UDL via `extern` - instead, you must specify the type.
45
+
46
+
For example:
47
+
```
48
+
[External="crate_name"]
49
+
typedef extern MyEnum
50
+
```
51
+
is no longer accepted - you must use, eg:
52
+
```
53
+
[External="crate_name"]
54
+
typedef enum MyEnum
55
+
```
56
+
57
+
Edge-cases broken include:
58
+
59
+
* Different variations of the `External` attribute (eg, `[ExternalInterface]`) are no longer supported; eg, `[ExternalInterface=".."] typedef extern ...` becomes `[External=".."] typedef interface ...` )
60
+
* The `[Rust=..]` attribute has been removed - you should just remove the attribute entirely.
61
+
62
+
See [Remote and External Types](./types/remote_ext_types.md) for more detail.
63
+
64
+
## Remote Types
65
+
66
+
The macros `ffi_converter_forward` and all `use_*` macros (eg, `use_udl_record!`, `use_udl_object!`, `use_udl_enum!` etc)
67
+
are now unnecessary so have been removed.
68
+
69
+
See [Remote and External Types](./types/remote_ext_types.md) for more detail.
70
+
71
+
## Shared Rust/UDL types
72
+
73
+
The `Rust` attribute has been removed - use the same typedef syntax described above for External Types.
= note: this error originates in the macro `uniffi_macros::generate_and_include_scaffolding` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments