Closed Evgene-Kopylov closed 2 months ago
Hi! Thanks for opening your first issue here! :smile:
Yes, thus that's why the log is of level INFO
and says
This is an issue only if the object is indeed used
And thus if you are not using it, feel free to ignore the message :)
As for why it is the case: I guess it is because,
[2024-08-28T08:21:41.124Z INFO C:\Users\user.cargo\registry\src\index.crates.io-6f17d22bba15001f\flutter_rust_bridge_codegen-2.3.0\src\library\codegen\parser\hir\flat\transformer\merge_duplicate_transformer\mod.rs:72] There are still multiple objects with same key after merging, thus randomly pick one. This is an issue only if the object is indeed used. (key="uniq_program_id", objects={"name":"crate::event_logger::database::schema::rule_program::columns/uniq_program_id","visibility":"Public","sources":["Normal"],"mirror":false}, {"name":"crate::event_logger::database::schema::titles::columns/uniq_program_id","visibility":"Public","sources":["Normal"],"mirror":false})
Your crate maybe somehow creates something (struct?) named uniq_program_id
, and frb currently does not consider namespaces. Thus if you really use the uniq_program_id
thing in Dart (surely you do not! so no worries), frb will get confused which one to choose.
How to disable this msg?
@fzyzcjy
Currently it cannot be disabled, but I may work on it later, though cannot guarantee, since it is not really a bug, but only a INFO level log message. Some thoughts if to modify the code: Change all these logs from INFO level to DEBUG level. And then have one INFO level log with content like There are still multiple objects with same key after merging, thus randomly pick one. This is an issue only if the object is indeed used. Please change log level to DEBUG to know more details.
and without any details. Then it will have a bit better developer experience but not printing long logs.
Close since this is not a bug but an INFO level message, but feel free to reopen if needed!
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
Multiple warnings about non-unique columns in Diesel's schemas.rs. Of course, the columns are unique within their respective tables, but the FRB does not account for this.
Steps to reproduce
schemas.rs
, make several tables withid
field.flutter_rust_bridge_codegen generate
Logs
Expected behavior
No response
Generated binding code
No response
OS
Windows
Version of
flutter_rust_bridge_codegen
2.3.0
Flutter info
No response
Version of
clang++
No response
Additional context
No response