Closed patmuk closed 10 hours ago
I also think I saw name resolution issues for structs with the same name in different mods, but I didn't have a chance to minimize and confirm yet.
Good point! This looks easily solvable, because we merely need to change the name from wire_view_impl
to contain full names (e.g. wire_api_share_cycle_view_impl
).
Feel free to PR (since this is not very hard); alternatively I will work on it in the next batch.
For completeness, the workaround (as you probably see) is to rename it temporarily.
@aran I also think I saw name resolution issues for structs with the same name in different mods
That one is indeed harder, because there is no easy way to understand which struct are users indeed using (there can be complex use ...
chains), so currently the struct names have to be unique.
I forgot to reply! Yes, understandable and totally fine to use different names.
No worries, it is implemented!
Describe the bug
When the same function name, but in different mods, is used, the rust generated code has a name clash.
This is the relevant part of the generated code:
not the same function name
wire_view_impl
but different full qualified name of the rust functioncrate::api::share_cycle::view()
vscrate::api::todo_list_api::view()
.Steps to reproduce
create rust code with the same function name in two different mods.
Logs
Expected behavior
No response
Generated binding code
No response
OS
MacOS
Version of
flutter_rust_bridge_codegen
2.0.0-dev.32
Flutter info
No response
Version of
clang++
No response
Additional context
No response