Closed sibman closed 2 weeks ago
Hi! Thanks for opening your first issue here! :smile:
Hi, could you please provide a minimal reproducible sample? That will make debugging easier
Close since inactivity, but feel free to reopen!
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Describe the bug
when generating code after update with flutter_rust_bridge_codegen generate, it is works for struct which marked with #[frb(opaque)] and not for struct which marked with #[frb(non_opaque)] It generates following error Error: Will generate duplicated class names (["StructName"]). This is often because the type is auto inferred as both opaque and non-opaque. Try to add
#[frb(opaque)]
or#[frb(non_opaque)]
to the struct, or change code that uses it.Steps to reproduce
Hint: A simple way to reproduce is to clone and modify the https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_example/dart_minimal example package according to your needs.
Logs
Expected behavior
[3.4s] Parse
└── [2.3s] Run cargo expand
└── [1.0s] Parse source graph
[0.1s] Generate
[8.4s] Polish
└── [7.8s] Run Dart formatter
└── [0.5s] Run Rust formatter
└── [0.0s] Auto upgrade Done!
Generated binding code
OS
Linux Mint 21.3 5.15.0-106-generic (Ubuntu 22.04)
Version of
flutter_rust_bridge_codegen
2.0.0-dev.33
Flutter info
Version of
clang++
clang++ --version Ubuntu clang version 18.1.3 (++20240322073153+ef6d1ec07c69-1~exp1~20240322193300.86) Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin
Additional context
No response