fzyzcjy / flutter_rust_bridge

Flutter/Dart <-> Rust binding generator, feature-rich, but seamless and simple.
https://fzyzcjy.github.io/flutter_rust_bridge/
MIT License
3.64k stars 256 forks source link

failed to generate for #[frb(non_opaque)] #1930

Closed sibman closed 2 weeks ago

sibman commented 3 weeks ago

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.

  1. add #[frb(opaque)] to struct
  2. run flutter_rust_bridge_codegen generate works
  3. update #[frb(opaque)] to #[frb(non_opaque)]
  4. run flutter_rust_bridge_codegen generate does not works

Logs

$ RUST_LOG=debug flutter_rust_bridge_codegen generate
[2024-05-09T00:49:25.226Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/main.rs:24] cli=Cli { verbose: false, command: Generate(GenerateCommandArgs { watch: false, primary: GenerateCommandArgsPrimary { config_file: None, rust_input: None, dart_output: None, c_output: None, duplicated_c_output: None, rust_root: None, rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, no_dart_enums_style: false, no_add_mod_to_lib: false, llvm_path: None, llvm_compiler_opts: None, dart_root: None, no_build_runner: false, extra_headers: None, no_web: false, no_deps_check: false, default_external_library_loader_web_prefix: None, no_dart3: false, full_dep: false, local: false, dump: None, dump_all: false } }) }
[2024-05-09T00:49:25.239Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/binary/commands_parser.rs:8] compute_codegen_config: mode=from_files_auto
[2024-05-09T00:49:25.252Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/config/config_parser.rs:45] Found config file flutter_rust_bridge.yaml
[2024-05-09T00:49:25.299Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/mod.rs:24] config=Config { base_dir: Some(""), rust_input: "rust/src/api/**/*.rs", dart_output: "lib/src/rust", c_output: None, duplicated_c_output: None, rust_root: None, rust_output: None, dart_entrypoint_class_name: None, dart_format_line_length: None, dart_enums_style: None, add_mod_to_lib: None, llvm_path: None, llvm_compiler_opts: None, dart_root: None, build_runner: None, extra_headers: None, web: None, deps_check: None, dart3: None, full_dep: None, local: None, default_external_library_loader_web_prefix: None, dump: None, dump_all: None } meta_config=MetaConfig { watch: false }
[2024-05-09T00:49:25.310Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/config/internal_config_parser.rs:42] InternalConfig.parse base_dir="/home/user/flutter_rust_proj"
[2024-05-09T00:49:27.807Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/mod.rs:27] internal_config=InternalConfig { controller: ControllerInternalConfig { watch: false, watching_paths: ["/home/user/flutter_rust_proj/rust/src"], exclude_paths: ["/home/user/flutter_rust_proj/rust/src/frb_generated.rs", "/home/user/flutter_rust_proj/rust/src/frb_generated.io.rs", "/home/user/flutter_rust_proj/rust/src/frb_generated.web.rs"], max_count: None }, preparer: PreparerInternalConfig { dart_root: "/home/user/flutter_rust_proj", deps_check: true, needs_ffigen: false }, parser: ParserInternalConfig { rust_input_path_pack: RustInputPathPack { rust_input_paths: ["/home/user/flutter_rust_proj/rust/src/api/model.rs", "/home/user/flutter_rust_proj/rust/src/api/model_persistence.rs", "/home/user/flutter_rust_proj/rust/src/api/simple.rs"] }, rust_crate_dir: "/home/user/flutter_rust_proj/rust", force_codec_mode_pack: Some(CodecModePack { dart2rust: Pde, rust2dart: Pde }), default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi }, generator: GeneratorInternalConfig { api_dart: GeneratorApiDartInternalConfig { dart_enums_style: true, dart3: true, dart_decl_base_output_path: "/home/user/flutter_rust_proj/lib/src/rust", dart_entrypoint_class_name: "RustLib" }, wire: GeneratorWireInternalConfig { dart: GeneratorWireDartInternalConfig { has_ffigen: false, web_enabled: true, llvm_path: ["/opt/homebrew/opt/llvm", "/usr/local/opt/llvm", "/usr/lib/llvm-9", "/usr/lib/llvm-10", "/usr/lib/llvm-11", "/usr/lib/llvm-12", "/usr/lib/llvm-13", "/usr/lib/llvm-14", "/usr/lib/", "/usr/lib64/", "C:/Program Files/llvm", "C:/msys64/mingw64"], llvm_compiler_opts: "", dart_root: "/home/user/flutter_rust_proj", extra_headers: "", dart_impl_output_path: TargetOrCommonMap { common: "/home/user/flutter_rust_proj/lib/src/rust/frb_generated.dart", io: "/home/user/flutter_rust_proj/lib/src/rust/frb_generated.io.dart", web: "/home/user/flutter_rust_proj/lib/src/rust/frb_generated.web.dart" }, dart_output_class_name_pack: DartOutputClassNamePack { entrypoint_class_name: "RustLib", api_class_name: "RustLibApi", api_impl_class_name: "RustLibApiImpl", api_impl_platform_class_name: "RustLibApiImplPlatform", wire_class_name: "RustLibWire", wasm_module_name: "RustLibWasmModule" }, default_external_library_loader: GeneratorWireDartDefaultExternalLibraryLoaderInternalConfig { stem: "rust_lib_flutter_rust_proj", io_directory: "rust/target/release/", web_prefix: "pkg/" }, c_symbol_prefix: "frbgen_flutter_rust_proj_" }, rust: GeneratorWireRustInternalConfig { rust_input_path_pack: RustInputPathPack { rust_input_paths: ["/home/user/flutter_rust_proj/rust/src/api/model.rs", "/home/user/flutter_rust_proj/rust/src/api/model_persistence.rs", "/home/user/flutter_rust_proj/rust/src/api/simple.rs"] }, rust_crate_dir: "/home/user/flutter_rust_proj/rust", web_enabled: true, rust_output_path: TargetOrCommonMap { common: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", io: "/home/user/flutter_rust_proj/rust/src/frb_generated.io.rs", web: "/home/user/flutter_rust_proj/rust/src/frb_generated.web.rs" }, c_symbol_prefix: "frbgen_flutter_rust_proj_", has_ffigen: false, default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi }, c: GeneratorWireCInternalConfig { enable: false, rust_crate_dir: "/home/user/flutter_rust_proj/rust", rust_output_path: TargetOrCommonMap { common: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", io: "/home/user/flutter_rust_proj/rust/src/frb_generated.io.rs", web: "/home/user/flutter_rust_proj/rust/src/frb_generated.web.rs" }, c_output_path: None, c_symbol_prefix: "frbgen_flutter_rust_proj_" } } }, polisher: PolisherInternalConfig { duplicated_c_output_path: [], dart_format_line_length: 80, add_mod_to_lib: true, build_runner: true, web_enabled: true, dart_root: "/home/user/flutter_rust_proj", rust_crate_dir: "/home/user/flutter_rust_proj/rust", rust_output_path: TargetOrCommonMap { common: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", io: "/home/user/flutter_rust_proj/rust/src/frb_generated.io.rs", web: "/home/user/flutter_rust_proj/rust/src/frb_generated.web.rs" }, c_output_path: None, enable_auto_upgrade: true }, dumper: DumperInternalConfig { dump_contents: [], dump_directory: "/home/user/flutter_rust_proj/rust/target/frb_dump" } }
[2024-05-09T00:49:27.812Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/utils/dart_repository/dart_repo.rs:22] Guessing toolchain the runner is run into
[2024-05-09T00:49:27.819Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/command_runner.rs:129] execute command: bin=sh args="-c \"flutter\" \"--version\"" current_dir=None cmd="sh" "-c" "\"flutter\" \"--version\""
[2024-05-09T00:49:30.540Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/command_runner.rs:140] command="sh" "-c" "\"flutter\" \"--version\"" stdout=Flutter 3.19.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 54e66469a9 (3 weeks ago) • 2024-04-17 13:08:03 -0700
Engine • revision c4cd48e186
Tools • Dart 3.3.4 • DevTools 2.31.1
 stderr=
[2024-05-09T00:49:30.544Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/reader.rs:22] read_rust_file rust_file_path="/home/user/flutter_rust_proj/rust/src/api/model.rs" module=Some("api::model")
[2024-05-09T00:49:30.545Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:31] CachedCargoExpand execute manifest_dir= rust_crate_dir="/home/user/flutter_rust_proj/rust"
[2024-05-09T00:49:30.546Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:118] Running cargo expand in '"/home/user/flutter_rust_proj/rust"'
[2024-05-09T00:49:30.546Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/command_runner.rs:129] execute command: bin=cargo args="expand --lib --theme=none --ugly" current_dir=Some("/home/user/flutter_rust_proj/rust") cmd=cd "/home/user/flutter_rust_proj/rust" && RUSTFLAGS="--cfg frb_expand" "cargo" "expand" "--lib" "--theme=none" "--ugly"
[2024-05-09T00:49:36.179Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/command_runner.rs:140] command=cd "/home/user/flutter_rust_proj/rust" && RUSTFLAGS="--cfg frb_expand" "cargo" "expand" "--lib" "--theme=none" "--ugly" stdout=#![feature(prelude_import)]
// auto generated mod will be provide in Generated binding code
pub mod api {
    pub mod model {
        use chrono::{DateTime, Local};
        use flutter_rust_bridge::frb;
        use uuid::Uuid;
        #[doc = r###"frb_marker: #[frb(non_opaque)]"###]
        pub enum Priority { Low, Medium, High, }
        #[automatically_derived]
        impl ::core::fmt::Debug for Priority {
            #[inline]
            fn fmt(&self, f: &mut ::core::fmt::Formatter)
                -> ::core::fmt::Result {
                ::core::fmt::Formatter::write_str(f,
                    match self {
                        Priority::Low => "Low",
                        Priority::Medium => "Medium",
                        Priority::High => "High",
                    })
            }
        }

        #[doc = r###"frb_marker: #[frb(non_opaque)]"###]
        pub struct Task {
            pub id: Uuid,
            pub title: String,
            pub subtitle: String,
            pub created_at: DateTime<Local>,
            pub is_completed: bool,
            pub priority: Priority,
        }
        // the rest of the code
    }
    pub mod simple {
        use crate::api::model::{Priority, Task};
        use uuid::Uuid;
        #[doc = r###"frb_marker: #[frb(init)]"###]
        pub fn init_app() { flutter_rust_bridge::setup_default_user_utils(); }
        pub fn filter_tasks_by_completion(is_completed: bool) -> Vec<Task> {
            let tasks =
                match read_all_tasks() {
                    Ok(tasks) => tasks,
                    Err(error) => {
                        ::core::panicking::panic_fmt(format_args!("Problem reading all tasks: {0:?}",
                                error));
                    }
                };
            crate::api::model::filter_tasks_by_completion(tasks, is_completed)
        }
        pub fn filter_tasks_by_priority(priority: Priority) -> Vec<Task> {
            let tasks =
                match read_all_tasks() {
                    Ok(tasks) => tasks,
                    Err(error) => {
                        ::core::panicking::panic_fmt(format_args!("Problem reading all tasks: {0:?}",
                                error));
                    }
                };
            crate::api::model::filter_tasks_by_priority(tasks, priority)
        }
        pub fn create_task(task_title: String, task_subtitle: String,
            task_priority: Priority) -> Result<(), rusqlite::Error> {
            crate::api::model_persistence::create_task_in_db(&task_title,
                &task_subtitle, task_priority)
        }
        pub fn read_all_tasks() -> Result<Vec<Task>, rusqlite::Error> {
            crate::api::model_persistence::read_all_tasks_from_db()
        }
        pub fn read_task(task_id: &Uuid)
            -> Result<Option<Task>, rusqlite::Error> {
            crate::api::model_persistence::read_task_from_db(task_id)
        }
        pub fn update_task(task_id: &Uuid, title: String, subtitle: String,
            priority: Priority, is_completed: bool)
            -> Result<(), rusqlite::Error> {
            crate::api::model_persistence::update_task_in_db(task_id, &title,
                &subtitle, priority, is_completed)
        }
        pub fn delete_task(task_id: &Uuid) -> Result<(), rusqlite::Error> {
            crate::api::model_persistence::delete_task_from_db(task_id)
        }
    }
}
 stderr=    Checking rust_lib_flutter_rust_proj v0.1.0 (/home/user/flutter_rust_proj/rust)
error[E0428]: the name `wire_filter_tasks_by_completion_impl` is defined multiple times
   --> src/frb_generated.rs:536:1
    |
221 | / fn wire_filter_tasks_by_completion_impl(
222 | |     port_: flutter_rust_bridge::for_generated::MessagePort,
223 | |     ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
224 | |     rust_vec_len_: i32,
...   |
255 | |     )
256 | | }
    | |_- previous definition of the value `wire_filter_tasks_by_completion_impl` here
...
536 | / fn wire_filter_tasks_by_completion_impl(
537 | |     port_: flutter_rust_bridge::for_generated::MessagePort,
538 | |     ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
539 | |     rust_vec_len_: i32,
...   |
568 | |     )
569 | | }
    | |_^ `wire_filter_tasks_by_completion_impl` redefined here
    |
    = note: `wire_filter_tasks_by_completion_impl` must be defined only once in the value namespace of this module
error[E0428]: the name `wire_filter_tasks_by_priority_impl` is defined multiple times
   --> src/frb_generated.rs:570:1
    |
257 | / fn wire_filter_tasks_by_priority_impl(
258 | |     port_: flutter_rust_bridge::for_generated::MessagePort,
259 | |     ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
260 | |     rust_vec_len_: i32,
...   |
291 | |     )
292 | | }
    | |_- previous definition of the value `wire_filter_tasks_by_priority_impl` here
...
570 | / fn wire_filter_tasks_by_priority_impl(
571 | |     port_: flutter_rust_bridge::for_generated::MessagePort,
572 | |     ptr_: flutter_rust_bridge::for_generated::PlatformGeneralizedUint8ListPtr,
573 | |     rust_vec_len_: i32,
...   |
600 | |     )
601 | | }
    | |_^ `wire_filter_tasks_by_priority_impl` redefined here
    |
    = note: `wire_filter_tasks_by_priority_impl` must be defined only once in the value namespace of this module
For more information about this error, try `rustc --explain E0428`.

[2024-05-09T00:49:36.450Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/reader.rs:22] read_rust_file rust_file_path="/home/user/flutter_rust_proj/rust/src/api/model_persistence.rs" module=Some("api::model_persistence")
[2024-05-09T00:49:36.451Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:31] CachedCargoExpand execute manifest_dir= rust_crate_dir="/home/user/flutter_rust_proj/rust"
[2024-05-09T00:49:36.471Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/reader.rs:22] read_rust_file rust_file_path="/home/user/flutter_rust_proj/rust/src/api/simple.rs" module=Some("api::simple")
[2024-05-09T00:49:36.472Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:31] CachedCargoExpand execute manifest_dir= rust_crate_dir="/home/user/flutter_rust_proj/rust"
[2024-05-09T00:49:36.588Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/crates.rs:26] parse manifest_path="/home/user/flutter_rust_proj/rust/Cargo.toml"
[2024-05-09T00:49:38.574Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/lib.rs", module_path: ["crate"] }
[2024-05-09T00:49:38.574Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "frb_generated"]
[2024-05-09T00:49:38.574Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:202] parse_syn_item_mod_contentless module_path=["crate", "frb_generated"]
[2024-05-09T00:49:38.575Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:205] file_path_candidates "frb_generated" "/home/user/flutter_rust_proj/rust/src/lib.rs" ["/home/user/flutter_rust_proj/rust/src/frb_generated.rs", "/home/user/flutter_rust_proj/rust/src/frb_generated/mod.rs", "/home/user/flutter_rust_proj/rust/src/lib/frb_generated.rs", "/home/user/flutter_rust_proj/rust/src/lib/frb_generated/mod.rs"]
[2024-05-09T00:49:38.575Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/reader.rs:22] read_rust_file rust_file_path="/home/user/flutter_rust_proj/rust/src/frb_generated.rs" module=Some("frb_generated")
[2024-05-09T00:49:38.575Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:31] CachedCargoExpand execute manifest_dir= rust_crate_dir="/home/user/flutter_rust_proj/rust"
[2024-05-09T00:49:38.577Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:216] Trying to parse "/home/user/flutter_rust_proj/rust/src/frb_generated.rs"
[2024-05-09T00:49:38.763Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Inherited, file_path: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", module_path: ["crate", "frb_generated"] }
[2024-05-09T00:49:38.764Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: FrbWrapper, span: bytes(23063..23073) }
[2024-05-09T00:49:38.764Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: MoiArc, span: bytes(23737..23743) }
[2024-05-09T00:49:38.766Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [], vis: Visibility::Inherited, type_token: Type, ident: Ident { sym: ObjectId, span: bytes(27563..27571) }, generics: Generics { lt_token: None, params: [], gt_token: None, where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: usize, span: bytes(27574..27579) }, arguments: PathArguments::None }] } }, semi_token: Semi }
[2024-05-09T00:49:38.766Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [], vis: Visibility::Public(Pub), type_token: Type, ident: Ident { sym: MoiArcPool, span: bytes(27594..27604) }, generics: Generics { lt_token: Some(Lt), params: [GenericParam::Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(27605..27606) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: std, span: bytes(27610..27613) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: sync, span: bytes(27615..27619) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: RwLock, span: bytes(27621..27627) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: MoiArcPoolInner, span: bytes(27628..27643) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(27644..27645) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } })], gt_token: Gt } }] } }, semi_token: Semi }
[2024-05-09T00:49:38.767Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: MoiArcPoolInner, span: bytes(27664..27679) }
[2024-05-09T00:49:38.768Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: IdGenerator, span: bytes(27972..27983) }
[2024-05-09T00:49:38.769Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: MoiArcPoolValue, span: bytes(28556..28571) }
[2024-05-09T00:49:38.770Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(28980..29021) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " Please refer to `RustOpaque` for doc." } } } }], vis: Visibility::Public(Pub), type_token: Type, ident: Ident { sym: RustOpaqueMoi, span: bytes(29035..29048) }, generics: Generics { lt_token: Some(Lt), params: [GenericParam::Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(29049..29050) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: flutter_rust_bridge, span: bytes(29064..29083) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: for_generated, span: bytes(29085..29098) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: RustOpaqueBase, span: bytes(29100..29114) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29115..29116) }, arguments: PathArguments::None }] } }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: MoiArc, span: bytes(29118..29124) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29125..29126) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } })], gt_token: Gt } }] } }, semi_token: Semi }
[2024-05-09T00:49:38.770Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(29134..29246) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " A wrapper to support [arbitrary Rust types](https://cjycode.com/flutter_rust_bridge/guides/types/arbitrary)." } } } }], vis: Visibility::Public(Pub), type_token: Type, ident: Ident { sym: RustOpaque, span: bytes(29260..29270) }, generics: Generics { lt_token: Some(Lt), params: [GenericParam::Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(29271..29272) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: RustOpaqueMoi, span: bytes(29276..29289) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29290..29291) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } }, semi_token: Semi }
[2024-05-09T00:49:38.771Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(29348..29393) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " Please refer to `RustAutoOpaque` for doc." } } } }], vis: Visibility::Public(Pub), type_token: Type, ident: Ident { sym: RustAutoOpaqueMoi, span: bytes(29407..29424) }, generics: Generics { lt_token: Some(Lt), params: [GenericParam::Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(29425..29426) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: flutter_rust_bridge, span: bytes(29440..29459) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: for_generated, span: bytes(29461..29474) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: RustAutoOpaqueBase, span: bytes(29476..29494) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29495..29496) }, arguments: PathArguments::None }] } }), Comma, GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: MoiArc, span: bytes(29506..29512) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: Some(PathSep), segments: [PathSegment { ident: Ident { sym: flutter_rust_bridge, span: bytes(29515..29534) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: for_generated, span: bytes(29536..29549) }, arguments: PathArguments::None }, PathSep, PathSegment { ident: Ident { sym: RustAutoOpaqueInner, span: bytes(29551..29570) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29571..29572) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } })], gt_token: Gt } }] } })], gt_token: Gt } }] } }, semi_token: Semi }
[2024-05-09T00:49:38.790Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:124] parse_syn_item_struct_or_enum item_type=ItemType { attrs: [Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(29581..29647) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " Usually this is unneeded, and just write down arbitrary types." } } } }, Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(29652..29732) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " However, when you need arbitrary types at places that are not supported yet," } } } }, Attribute { pound_token: Pound, style: AttrStyle::Outer, bracket_token: Bracket, meta: Meta::NameValue { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: doc, span: bytes(29737..29783) }, arguments: PathArguments::None }] }, eq_token: Eq, value: Expr::Lit { attrs: [], lit: Lit::Str { token: " use `RustOpaqueOpaque<YourArbitraryType>`." } } } }], vis: Visibility::Public(Pub), type_token: Type, ident: Ident { sym: RustAutoOpaque, span: bytes(29797..29811) }, generics: Generics { lt_token: Some(Lt), params: [GenericParam::Type(TypeParam { attrs: [], ident: Ident { sym: T, span: bytes(29812..29813) }, colon_token: None, bounds: [], eq_token: None, default: None })], gt_token: Some(Gt), where_clause: None }, eq_token: Eq, ty: Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: RustAutoOpaqueMoi, span: bytes(29817..29834) }, arguments: PathArguments::AngleBracketed { colon2_token: None, lt_token: Lt, args: [GenericArgument::Type(Type::Path { qself: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { sym: T, span: bytes(29835..29836) }, arguments: PathArguments::None }] } })], gt_token: Gt } }] } }, semi_token: Semi }
[2024-05-09T00:49:38.790Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: StreamSink, span: bytes(31492..31502) }
[2024-05-09T00:49:38.791Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: FLUTTER_RUST_BRIDGE_HANDLER, span: bytes(34360..34387) }
[2024-05-09T00:49:38.791Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "frb_generated", "io"]
[2024-05-09T00:49:38.791Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:180] parse_syn_item_mod_contentful module_path=["crate", "frb_generated", "io"]
[2024-05-09T00:49:38.791Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Inherited, file_path: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", module_path: ["crate", "frb_generated", "io"] }
[2024-05-09T00:49:38.792Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Inherited, file_path: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", module_path: ["crate", "frb_generated", "io"] }
[2024-05-09T00:49:38.799Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Inherited, file_path: "/home/user/flutter_rust_proj/rust/src/frb_generated.rs", module_path: ["crate", "frb_generated"] }
[2024-05-09T00:49:38.802Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "api"]
[2024-05-09T00:49:38.802Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:202] parse_syn_item_mod_contentless module_path=["crate", "api"]
[2024-05-09T00:49:38.844Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:205] file_path_candidates "api" "/home/user/flutter_rust_proj/rust/src/lib.rs" ["/home/user/flutter_rust_proj/rust/src/api.rs", "/home/user/flutter_rust_proj/rust/src/api/mod.rs", "/home/user/flutter_rust_proj/rust/src/lib/api.rs", "/home/user/flutter_rust_proj/rust/src/lib/api/mod.rs"]
[2024-05-09T00:49:38.844Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/reader.rs:22] read_rust_file rust_file_path="/home/user/flutter_rust_proj/rust/src/api/mod.rs" module=Some("api")
[2024-05-09T00:49:38.845Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/commands/cargo_expand.rs:31] CachedCargoExpand execute manifest_dir= rust_crate_dir="/home/user/flutter_rust_proj/rust"
[2024-05-09T00:49:38.846Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:216] Trying to parse "/home/user/flutter_rust_proj/rust/src/api/mod.rs"
[2024-05-09T00:49:38.889Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api"] }
[2024-05-09T00:49:38.890Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "api", "model"]
[2024-05-09T00:49:38.891Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:180] parse_syn_item_mod_contentful module_path=["crate", "api", "model"]
[2024-05-09T00:49:38.892Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "model"] }
[2024-05-09T00:49:38.893Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: Priority, span: bytes(97611..97619) }
[2024-05-09T00:49:38.894Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: Task, span: bytes(99086..99090) }
[2024-05-09T00:49:38.899Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "model"] }
[2024-05-09T00:49:38.902Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "api", "model_persistence"]
[2024-05-09T00:49:38.903Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:180] parse_syn_item_mod_contentful module_path=["crate", "api", "model_persistence"]
[2024-05-09T00:49:38.909Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "model_persistence"] }
[2024-05-09T00:49:38.910Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: CONNECTION, span: bytes(102318..102328) }
[2024-05-09T00:49:38.910Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: CachedConnection, span: bytes(103449..103465) }
[2024-05-09T00:49:38.911Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:101] parse_syn_item_struct_or_enum item_ident=Ident { sym: CustomError, span: bytes(104544..104555) }
[2024-05-09T00:49:38.913Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "model_persistence"] }
[2024-05-09T00:49:38.916Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:150] parse_syn_item_mod module_path=["crate", "api", "simple"]
[2024-05-09T00:49:38.917Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:180] parse_syn_item_mod_contentful module_path=["crate", "api", "simple"]
[2024-05-09T00:49:38.918Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:31] parse START info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "simple"] }
[2024-05-09T00:49:38.919Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api", "simple"] }
[2024-05-09T00:49:38.921Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/api/mod.rs", module_path: ["crate", "api"] }
[2024-05-09T00:49:38.923Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/source_graph/module_parser.rs:77] parse END info=ModuleInfo { visibility: Public, file_path: "/home/user/flutter_rust_proj/rust/src/lib.rs", module_path: ["crate"] }
[2024-05-09T00:49:38.930Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: filter_tasks_by_completion, span: bytes(3998..4024) }
[2024-05-09T00:49:38.935Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: filter_tasks_by_priority, span: bytes(4228..4252) }
[2024-05-09T00:49:38.937Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: new, span: bytes(3236..3239) }
[2024-05-09T00:49:38.941Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: mark_completed, span: bytes(3669..3683) }
[2024-05-09T00:49:38.944Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: mark_incomplete, span: bytes(3769..3784) }
[2024-05-09T00:49:38.956Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: set_priority, span: bytes(3871..3883) }
[2024-05-09T00:49:38.957Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: create_task_in_db, span: bytes(8292..8309) }
[2024-05-09T00:49:38.958Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: read_all_tasks_from_db, span: bytes(8768..8790) }
[2024-05-09T00:49:38.964Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: read_task_from_db, span: bytes(9119..9136) }
[2024-05-09T00:49:38.965Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: update_task_in_db, span: bytes(9490..9507) }
[2024-05-09T00:49:38.966Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: delete_task_from_db, span: bytes(10281..10300) }
[2024-05-09T00:49:38.968Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: greet, span: bytes(19768..19773) }
[2024-05-09T00:49:38.969Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: init_app, span: bytes(19997..20005) }
[2024-05-09T00:49:38.971Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: filter_tasks_by_completion, span: bytes(20076..20102) }
[2024-05-09T00:49:38.992Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: filter_tasks_by_priority, span: bytes(20567..20591) }
[2024-05-09T00:49:38.993Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: create_task, span: bytes(21050..21061) }
[2024-05-09T00:49:38.996Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: read_all_tasks, span: bytes(21321..21335) }
[2024-05-09T00:49:39.003Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: read_task, span: bytes(21471..21480) }
[2024-05-09T00:49:39.004Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: update_task, span: bytes(21647..21658) }
[2024-05-09T00:49:39.016Z DEBUG /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/flutter_rust_bridge_codegen-2.0.0-dev.33/src/library/codegen/parser/function_parser/mod.rs:70] parse_function function name: Ident { sym: delete_task, span: bytes(21959..21970) }
[8.5s] Parse  
  └── [6.0s] Run cargo expand  
  └── [2.3s] Parse source graph  
[0.1s] Generate                                                                                                                                                                                                                               Error: Will generate duplicated class names (["Task"]). 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.

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

can provide separately, too much info

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

[✓] Flutter (Channel stable, 3.19.6, on Linux Mint 21.3 5.15.0-106-generic, locale en_US.UTF-8)
    • Flutter version 3.19.6 on channel stable at /home/user/repo/github/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (3 weeks ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/sibman/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • ANDROID_SDK_ROOT = /home/sibman/Android/Sdk
    • Java binary at: /home/user/tools/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • Ubuntu clang version 18.1.3 (++20240322073153+ef6d1ec07c69-1~exp1~20240322193300.86)
    • cmake version 3.29.3
    • ninja version 1.11.1
    • pkg-config version 0.29.2

[✓] Android Studio (version 2023.3)
    • Android Studio at /home/user/tools/android-studio
    • Flutter plugin version 79.0.2
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0-17.0.10b1087.21-11572160)

[✓] VS Code (version 1.89.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.88.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Linux Mint 21.3 5.15.0-106-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 124.0.6367.155

[✓] Network resources
    • All expected network resources are available.

• No issues found!

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

welcome[bot] commented 3 weeks ago

Hi! Thanks for opening your first issue here! :smile:

fzyzcjy commented 3 weeks ago

Hi, could you please provide a minimal reproducible sample? That will make debugging easier

fzyzcjy commented 2 weeks ago

Close since inactivity, but feel free to reopen!

github-actions[bot] commented 3 days ago

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.