2020-07-10 14:34:12 +03:00
|
|
|
[workspace]
|
|
|
|
members = [
|
2020-08-05 21:26:16 +03:00
|
|
|
"uniffi_bindgen",
|
|
|
|
"uniffi_build",
|
2022-10-18 19:26:47 +03:00
|
|
|
"uniffi_core",
|
2020-07-10 14:34:12 +03:00
|
|
|
"uniffi_macros",
|
2022-05-30 16:48:47 +03:00
|
|
|
"uniffi_meta",
|
2022-03-15 18:53:05 +03:00
|
|
|
"uniffi_testing",
|
2023-07-04 00:55:20 +03:00
|
|
|
"uniffi_udl",
|
2020-08-05 21:26:16 +03:00
|
|
|
"uniffi",
|
2022-04-22 14:19:39 +03:00
|
|
|
"weedle2",
|
2022-05-30 16:48:47 +03:00
|
|
|
|
2023-05-01 02:32:54 +03:00
|
|
|
"examples/app/uniffi-bindgen-cli",
|
2020-07-10 14:34:12 +03:00
|
|
|
"examples/arithmetic",
|
2021-01-22 15:31:05 +03:00
|
|
|
"examples/callbacks",
|
2023-05-01 02:32:54 +03:00
|
|
|
"examples/custom-types",
|
2023-07-19 18:30:19 +03:00
|
|
|
"examples/futures",
|
2020-07-10 14:34:12 +03:00
|
|
|
"examples/geometry",
|
2020-07-31 00:34:36 +03:00
|
|
|
"examples/rondpoint",
|
2020-07-10 14:34:12 +03:00
|
|
|
"examples/sprites",
|
2020-12-08 09:50:00 +03:00
|
|
|
"examples/todolist",
|
2023-05-01 02:32:54 +03:00
|
|
|
"examples/traits",
|
2021-08-12 11:47:55 +03:00
|
|
|
|
2023-03-01 23:18:05 +03:00
|
|
|
"fixtures/benchmarks",
|
2021-05-07 09:27:14 +03:00
|
|
|
"fixtures/coverall",
|
2021-08-03 19:13:02 +03:00
|
|
|
"fixtures/callbacks",
|
2021-08-12 11:47:55 +03:00
|
|
|
|
|
|
|
"fixtures/ext-types/guid",
|
2023-08-09 16:57:42 +03:00
|
|
|
"fixtures/ext-types/http-headermap",
|
2021-08-12 11:47:55 +03:00
|
|
|
"fixtures/ext-types/uniffi-one",
|
|
|
|
"fixtures/ext-types/lib",
|
2023-06-15 17:54:30 +03:00
|
|
|
"fixtures/ext-types/proc-macro-lib",
|
2021-08-12 11:47:55 +03:00
|
|
|
|
2023-04-07 22:33:36 +03:00
|
|
|
"fixtures/foreign-executor",
|
2022-06-16 09:31:58 +03:00
|
|
|
"fixtures/keywords/kotlin",
|
|
|
|
"fixtures/keywords/rust",
|
2022-09-30 01:29:08 +03:00
|
|
|
"fixtures/keywords/swift",
|
2023-02-02 19:19:14 +03:00
|
|
|
"fixtures/metadata",
|
2022-10-04 19:11:51 +03:00
|
|
|
"fixtures/proc-macro",
|
2022-03-28 23:20:04 +03:00
|
|
|
"fixtures/reexport-scaffolding-macro",
|
2020-12-08 09:50:00 +03:00
|
|
|
"fixtures/regressions/enum-without-i32-helpers",
|
2021-08-10 04:35:03 +03:00
|
|
|
"fixtures/regressions/fully-qualified-types",
|
2021-07-13 23:09:17 +03:00
|
|
|
"fixtures/regressions/kotlin-experimental-unsigned-types",
|
2021-02-18 13:51:01 +03:00
|
|
|
"fixtures/regressions/cdylib-crate-type-dependency/ffi-crate",
|
|
|
|
"fixtures/regressions/cdylib-crate-type-dependency/cdylib-dependency",
|
2023-01-04 00:22:53 +03:00
|
|
|
"fixtures/regressions/logging-callback-interface",
|
2022-06-21 11:10:07 +03:00
|
|
|
"fixtures/regressions/missing-newline",
|
2022-08-26 19:45:17 +03:00
|
|
|
"fixtures/regressions/swift-callbacks-omit-labels",
|
2022-10-06 18:14:05 +03:00
|
|
|
"fixtures/regressions/swift-dictionary-nesting",
|
Fully qualify uses of `Result` in scaffolding/macro code
PR #1469 introduced an incompatibility with a local `type Result<T> =
std::result::Result<T, MyError>` type alias. As can be seen with the included
test without the fix applied:
```
error[E0107]: this type alias takes 1 generic argument but 2 generic arguments were supplied
--> /mounted_workdir/target/debug/build/unary-result-alias-f408c03f1955dadd/out/unary-result-alias.uniffi.rs:79:1
|
79 | / #[::uniffi::ffi_converter_error(
80 | | tag = crate::UniFfiTag,
81 | | flat_error,
82 | |
83 | | )]
| | ^
| | |
| |__expected 1 generic argument
| help: remove this generic argument
|
note: type alias defined here, with 1 generic parameter: `T`
--> fixtures/regressions/unary-result-alias/src/lib.rs:7:10
|
7 | pub type Result<T> = std::result::Result<T, MyError>;
| ^^^^^^ -
= note: this error originates in the macro `::uniffi::ffi_converter_default_return` which comes from the expansion of the attribute macro `::uniffi::ffi_converter_error` (in Nightly builds, run with -Z macro-backtrace for more info)
```
Fixing the macros in `uniffi_core` to use `::std::result::Result` fixes that.
This exposes a further case in the generated code:
```
error[E0107]: this type alias takes 1 generic argument but 2 generic arguments were supplied
--> /mounted_workdir/target/debug/build/unary-result-alias-f408c03f1955dadd/out/unary-result-alias.uniffi.rs:108:40
|
108 | uniffi::rust_call(call_status, || <Result<(), r#MyError> as ::uniffi::FfiConverter<crate::UniFfiTag>>::lower_return(
| ^^^^^^ --------- help: remove this generic argument
| |
| expected 1 generic argument
|
note: type alias defined here, with 1 generic parameter: `T`
--> fixtures/regressions/unary-result-alias/src/lib.rs:7:10
|
7 | pub type Result<T> = std::result::Result<T, MyError>;
| ^^^^^^ -
```
So the same change is required to the output produced by bindgen.
2023-04-05 18:40:57 +03:00
|
|
|
"fixtures/regressions/unary-result-alias",
|
2023-05-25 20:01:12 +03:00
|
|
|
"fixtures/trait-methods",
|
2021-09-03 07:29:46 +03:00
|
|
|
"fixtures/uitests",
|
2021-05-18 21:29:13 +03:00
|
|
|
"fixtures/uniffi-fixture-time",
|
2023-03-27 00:32:41 +03:00
|
|
|
"fixtures/version-mismatch",
|
2022-05-30 16:49:36 +03:00
|
|
|
"fixtures/simple-fns",
|
2022-06-01 19:33:59 +03:00
|
|
|
"fixtures/simple-iface",
|
2021-12-01 19:42:13 +03:00
|
|
|
"fixtures/swift-omit-labels",
|
2022-11-03 19:46:42 +03:00
|
|
|
"fixtures/futures",
|
2023-04-06 12:48:52 +03:00
|
|
|
"fixtures/swift-bridging-header-compile",
|
2023-05-17 11:20:01 +03:00
|
|
|
"fixtures/type-limits",
|
2023-07-05 08:40:21 +03:00
|
|
|
"fixtures/large-enum",
|
2020-07-10 14:34:12 +03:00
|
|
|
]
|
2022-05-27 13:34:16 +03:00
|
|
|
|
|
|
|
resolver = "2"
|