generated cst_encode_list_Uuid has compile error
aran opened this issue · comments
Describe the bug
In generated frb_generated.io.dart, the function
@protected
ffi.Pointer<wire_cst_list_Uuid> cst_encode_list_Uuid(List<UuidValue> raw) {
// Codec=Cst (C-struct based), see doc to use other codecs
final ans = wire.cst_new_list_Uuid(raw.length);
for (var i = 0; i < raw.length; ++i) {
ans.ref.ptr[i] = cst_encode_Uuid(raw[i]);
}
return ans;
}
has the following compile error:
A value of type 'Pointer<wire_cst_list_prim_u_8_strict>' can't be assigned to a variable of type 'wire_cst_list_prim_u_8_strict'.
Try changing the type of the variable, or casting the right-hand type to 'wire_cst_list_prim_u_8_strict'.
Steps to reproduce
Use the uuid
feature, have some data and functions with Uuid, and run flutter_rust_bridge_codegen generate
Logs
N/A
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of flutter_rust_bridge_codegen
Generated by flutter_rust_bridge
@ 2.0.0-dev.24.
Flutter info
Flutter (Channel beta, 3.19.0-0.1.pre, on macOS 14.2.1 23C71 darwin-arm64, locale en-US
Version of clang++
No response
Additional context
No response
Looks like a bug, feel free to PR to fix it! Or, I will fix it in the next batch (hopefully within a week).
It has a workaround: If you set full_dep: false
, it will use SSE codec by default, which does not have this issue (because this issue is CST-codec-only).
Thanks for the workaround!
You are welcome!