fzyzcjy / flutter_rust_bridge

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

Error: missing pubspec.lock in `path/to/the/package` #2186

Closed AlexV525 closed 3 months ago

AlexV525 commented 3 months ago

Describe the bug

Failed to generate native libraries during the integration with published packages.

Steps to reproduce

  1. flutter pub add ord_dart
  2. flutter run

Logs

Running pub get in "X:\app\build\ord_dart\build\build_tool"
Resolving dependencies...
Downloading packages...
+ adaptive_number 1.0.0
+ args 2.4.2 (2.5.0 available)
+ async 2.11.0
+ build_tool 1.0.0 from path X:\SDK\Pub\Cache\hosted\pub.flutter-io.cn\ord_dart-0.1.0\cargokit\build_tool
+ collection 1.18.0 (1.19.0 available)
+ convert 3.1.1
+ crypto 3.0.3
+ ed25519_edwards 0.3.1
+ fixnum 1.1.0
+ github 9.17.0 (9.24.0 available)
+ hex 0.2.0
+ http 1.1.0 (1.2.1 available)
+ http_parser 4.0.2 (4.1.0 available)
+ json_annotation 4.9.0
+ logging 1.2.0
+ meta 1.15.0
+ path 1.8.0 (1.9.0 available)
+ petitparser 5.4.0 (6.0.2 available)
+ source_span 1.10.0
+ string_scanner 1.2.0
+ term_glyph 1.2.1
+ toml 0.14.0 (0.15.0 available)
+ typed_data 1.3.2
+ version 3.0.0 (3.0.2 available)
+ yaml 3.1.2
Changed 25 dependencies!
9 packages have newer versions incompatible with dependency constraints.
Try `dart pub outdated` for more information.
Compiling bin/build_tool_runner.dart to kernel file bin/build_tool_runner.dill.
INFO: Precompiled binaries are disabled
INFO: Installing Rust target: aarch64-linux-android
INFO: Building ord_dart for aarch64-linux-android
SEVERE: ================================================================================
SEVERE: Cargokit BuildTool failed with error:
SEVERE: --------------------------------------------------------------------------------
SEVERE: External Command: rustup "run" "stable" "cargo" "build" "--manifest-path" "X:\SDK\Pub\Cache\hosted\pub.flutter-io.cn\ord_dart-0.1.0\rust\Cargo.toml" "-p" "ord_dart" "--target" "aarch64-linux-android" "--target-dir" "X:\app\build\ord_dart/build"
SEVERE: Returned Exit Code: 101
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDOUT:
SEVERE: --------------------------------------------------------------------------------
SEVERE: STDERR:
SEVERE: Compiling proc-macro2 v1.0.83
SEVERE:    Compiling unicode-ident v1.0.12
SEVERE:    Compiling autocfg v1.1.0
SEVERE:    Compiling windows_x86_64_msvc v0.52.5
SEVERE:    Compiling cc v1.0.83
SEVERE:    Compiling libc v0.2.150
SEVERE:    Compiling cfg-if v1.0.0
SEVERE:    Compiling serde v1.0.202
SEVERE:    Compiling futures-core v0.3.29
SEVERE:    Compiling futures-channel v0.3.29
SEVERE:    Compiling futures-task v0.3.29
SEVERE:    Compiling version_check v0.9.4
SEVERE:    Compiling typenum v1.17.0
SEVERE:    Compiling memchr v2.6.4
SEVERE:    Compiling strsim v0.11.1
SEVERE:    Compiling syn v1.0.109
SEVERE:    Compiling lazy_static v1.4.0
SEVERE:    Compiling windows_x86_64_msvc v0.48.5
SEVERE:    Compiling hashbrown v0.14.5
SEVERE:    Compiling log v0.4.20
SEVERE:    Compiling generic-array v0.14.7
SEVERE:    Compiling slab v0.4.9
SEVERE:    Compiling lock_api v0.4.12
SEVERE:    Compiling windows-targets v0.52.5
SEVERE:    Compiling windows-sys v0.52.0
SEVERE:    Compiling crossbeam-utils v0.8.20
SEVERE:    Compiling futures-util v0.3.29
SEVERE:    Compiling parking_lot_core v0.9.10
SEVERE:    Compiling winapi v0.3.9
SEVERE:    Compiling futures-sink v0.3.29
SEVERE:    Compiling num-traits v0.2.19
SEVERE:    Compiling indexmap v1.9.3
SEVERE:    Compiling quote v1.0.36
SEVERE:    Compiling anstyle v1.0.7
SEVERE:    Compiling syn v2.0.66
SEVERE:    Compiling winapi-util v0.1.8
SEVERE:    Compiling equivalent v1.0.1
SEVERE:    Compiling utf8parse v0.2.1
SEVERE:    Compiling ryu v1.0.18
SEVERE:    Compiling smallvec v1.13.2
SEVERE:    Compiling pin-utils v0.1.0
SEVERE:    Compiling scopeguard v1.2.0
SEVERE:    Compiling pin-project-lite v0.2.13
SEVERE:    Compiling portable-atomic v1.6.0
SEVERE:    Compiling serde_json v1.0.117
SEVERE:    Compiling futures-io v0.3.29
SEVERE:    Compiling anstyle-parse v0.2.4
SEVERE:    Compiling indexmap v2.2.6
SEVERE:    Compiling same-file v1.0.6
SEVERE:    Compiling anstyle-wincon v3.0.3
SEVERE:    Compiling anstyle-query v1.0.3
SEVERE:    Compiling windows-targets v0.48.5
SEVERE:    Compiling ident_case v1.0.1
SEVERE:    Compiling winnow v0.6.8
SEVERE:    Compiling unicode-width v0.1.12
SEVERE:    Compiling once_cell v1.18.0
SEVERE:    Compiling backtrace v0.3.69
SEVERE:    Compiling semver v1.0.23
SEVERE:    Compiling block-buffer v0.10.4
SEVERE:    Compiling crypto-common v0.1.6
SEVERE:    Compiling rustversion v1.0.17
SEVERE:    Compiling digest v0.10.7
SEVERE:    Compiling colorchoice v1.0.1
SEVERE:    Compiling bitcoin-private v0.1.0
SEVERE:    Compiling is_terminal_polyfill v1.70.0
SEVERE:    Compiling fnv v1.0.7
SEVERE:    Compiling encode_unicode v0.3.6
SEVERE:    Compiling hashbrown v0.12.3
SEVERE:    Compiling itoa v1.0.11
SEVERE:    Compiling camino v1.1.7
SEVERE:    Compiling anstream v0.6.14
SEVERE:    Compiling crossbeam-channel v0.5.13
SEVERE:    Compiling console v0.15.8
SEVERE:    Compiling secp256k1-sys v0.8.1
SEVERE:    Compiling windows-sys v0.48.0
SEVERE:    Compiling walkdir v2.5.0
SEVERE:    Compiling filetime v0.2.23
SEVERE:    Compiling is-terminal v0.4.12
SEVERE:    Compiling aho-corasick v1.1.2
SEVERE:    Compiling anyhow v1.0.75
SEVERE:    Compiling regex-syntax v0.8.2
SEVERE:    Compiling fastrand v2.1.0
SEVERE:    Compiling darling_core v0.20.9
SEVERE:    Compiling rustc-demangle v0.1.23
SEVERE:    Compiling cbindgen v0.24.5
SEVERE:    Compiling hex v0.4.3
SEVERE:    Compiling heck v0.5.0
SEVERE:    Compiling linked-hash-map v0.5.6
SEVERE:    Compiling futures-executor v0.3.29
SEVERE:    Compiling number_prefix v0.4.0
SEVERE:    Compiling clap_lex v0.7.0
SEVERE:    Compiling paste v1.0.15
SEVERE:    Compiling heck v0.4.1
SEVERE:    Compiling clap_builder v4.5.2
SEVERE:    Compiling indicatif v0.17.8
SEVERE:    Compiling futures v0.3.29
SEVERE:    Compiling yaml-rust v0.4.5
SEVERE:    Compiling regex-automata v0.4.3
SEVERE:    Compiling notify v6.1.1
SEVERE:    Compiling tempfile v3.9.0
SEVERE:    Compiling colored v1.9.4
SEVERE:    Compiling chrono v0.4.38
SEVERE:    Compiling dashmap v5.5.3
SEVERE:    Compiling parking_lot v0.12.2
SEVERE:    Compiling include_dir_macros v0.7.3
SEVERE:    Compiling hex_lit v0.1.1
SEVERE:    Compiling rand_core v0.6.4
SEVERE:    Compiling adler v1.0.2
SEVERE:    Compiling cpufeatures v0.2.12
SEVERE:    Compiling gimli v0.28.1
SEVERE:    Compiling either v1.12.0
SEVERE:    Compiling itertools v0.10.5
SEVERE:    Compiling regex v1.10.2
SEVERE:    Compiling sha1 v0.10.6
SEVERE:    Compiling miniz_oxide v0.7.1
SEVERE:    Compiling rand v0.8.5
SEVERE:    Compiling include_dir v0.7.3
SEVERE:    Compiling fern v0.6.2
SEVERE:    Compiling bitcoin_hashes v0.12.0
SEVERE:    Compiling notify-debouncer-mini v0.4.1
SEVERE:    Compiling indicatif-log-bridge v0.2.2
SEVERE:    Compiling atty v0.2.14
SEVERE:    Compiling num_cpus v1.16.0
SEVERE:    Compiling dart-sys-fork v4.1.1
SEVERE:    Compiling object v0.32.1
SEVERE:    Compiling topological-sort v0.2.2
SEVERE:    Compiling strum v0.24.1
SEVERE:    Compiling glob v0.3.1
SEVERE:    Compiling pathdiff v0.2.1
SEVERE:    Compiling bitcoin v0.30.2
SEVERE:    Compiling addr2line v0.21.0
SEVERE:    Compiling build-target v0.4.0
SEVERE:    Compiling convert_case v0.5.0
SEVERE:    Compiling thiserror v1.0.61
SEVERE:    Compiling flutter_rust_bridge v2.0.0
SEVERE:    Compiling secp256k1 v0.27.0
SEVERE:    Compiling env_logger v0.10.1
SEVERE:    Compiling md-5 v0.10.6
SEVERE:    Compiling convert_case v0.4.0
SEVERE:    Compiling bech32 v0.9.1
SEVERE:    Compiling android_log-sys v0.3.1
SEVERE:    Compiling atomic v0.5.3
SEVERE:    Compiling threadpool v1.8.1
SEVERE:    Compiling android_logger v0.13.3
SEVERE:    Compiling tokio v1.34.0
SEVERE:    Compiling byteorder v1.5.0
SEVERE:    Compiling serde_derive v1.0.202
SEVERE:    Compiling darling_macro v0.20.9
SEVERE:    Compiling serial_test_derive v2.0.0
SEVERE:    Compiling futures-macro v0.3.29
SEVERE:    Compiling enum-iterator-derive v1.4.0
SEVERE:    Compiling clap_derive v4.5.4
SEVERE:    Compiling enum_dispatch v0.3.13
SEVERE:    Compiling thiserror-impl v1.0.61
SEVERE:    Compiling delegate-attr v0.3.0
SEVERE:    Compiling derivative v2.2.0
SEVERE:    Compiling darling v0.20.9
SEVERE:    Compiling strum_macros v0.24.3
SEVERE:    Compiling serial_test v2.0.0
SEVERE:    Compiling serde_with_macros v3.8.1
SEVERE:    Compiling derive_more v0.99.17
SEVERE:    Compiling flutter_rust_bridge_macros v2.0.0
SEVERE:    Compiling enum-iterator v1.5.0
SEVERE:    Compiling allo-isolate v0.1.25
SEVERE:    Compiling clap v4.5.4
SEVERE:    Compiling toml_datetime v0.6.6
SEVERE:    Compiling serde_spanned v0.6.6
SEVERE:    Compiling cargo-platform v0.1.8
SEVERE:    Compiling toml v0.5.11
SEVERE:    Compiling serde_yaml v0.8.26
SEVERE:    Compiling serde_with v3.8.1
SEVERE:    Compiling toml_edit v0.22.13
SEVERE:    Compiling cargo_metadata v0.14.2
SEVERE:    Compiling toml v0.8.13
SEVERE:    Compiling ordinals v0.0.8
SEVERE:    Compiling cargo_toml v0.18.0
SEVERE:    Compiling flutter_rust_bridge_codegen v2.0.0
SEVERE:    Compiling ord_dart v0.1.0 (X:\SDK\Pub\Cache\hosted\pub.flutter-io.cn\ord_dart-0.1.0\rust)
SEVERE: error: failed to run custom build command for `ord_dart v0.1.0 (X:\SDK\Pub\Cache\hosted\pub.flutter-io.cn\ord_dart-0.1.0\rust)`
SEVERE: 
SEVERE: Caused by:
SEVERE:   process didn't exit successfully: `X:\app\build\ord_dart/build\debug\build\ord_dart-472c3fe485384d13\build-script-build` (exit code: 1)
SEVERE:   --- stdout
SEVERE:   [2024-07-04T08:16:55.886Z DEBUG X:\SDK\rust\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\flutter_rust_bridge_codegen-2.0.0\src\library\codegen\config\config_parser.rs:51] Found config file ../flutter_rust_bridge.yaml
SEVERE:   [2024-07-04T08:16:55.887Z DEBUG X:\SDK\rust\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\flutter_rust_bridge_codegen-2.0.0\src\library\codegen\mod.rs:23] config=Config { base_dir: Some(".."), rust_input: Some("crate::api"), dart_output: Some("lib/src"), c_output: None, duplicated_c_output: None, rust_root: Some("rust"), rust_output: None, dart_entrypoint_class_name: Some("OrdDart"), dart_format_line_length: None, dart_preamble: None, rust_preamble: 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, dart_type_rename: None, enable_lifetime: None, type_64bit_int: None, stop_on_error: None, dump: None, dump_all: None } meta_config=MetaConfig { watch: false }
SEVERE:   [2024-07-04T08:16:55.887Z DEBUG X:\SDK\rust\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\flutter_rust_bridge_codegen-2.0.0\src\library\codegen\config\internal_config_parser\mod.rs:33] InternalConfig.parse base_dir=".."
SEVERE:   [2024-07-04T08:16:56.347Z DEBUG X:\SDK\rust\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\flutter_rust_bridge_codegen-2.0.0\src\library\codegen\mod.rs:26] internal_config=InternalConfig { controller: ControllerInternalConfig { watch: false, watching_paths: ["\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src"], exclude_paths: ["\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.rs", "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.io.rs", "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.web.rs"], max_count: None }, preparer: PreparerInternalConfig { dart_root: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0", deps_check: true, needs_ffigen: false }, parser: ParserInternalConfig { hir: ParserHirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, rust_crate_dir: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust", third_party_crate_names: [] }, mir: ParserMirInternalConfig { rust_input_namespace_pack: RustInputNamespacePack { rust_input_namespace_prefixes: [Namespace { joined_path: "crate::api" }], rust_output_path_namespace: Namespace { joined_path: "crate::frb_generated" } }, force_codec_mode_pack: Some(CodecModePack { dart2rust: Pde, rust2dart: Pde }), default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, stop_on_error: false, enable_lifetime: false, type_64bit_int: false } }, generator: GeneratorInternalConfig { api_dart: GeneratorApiDartInternalConfig { dart_enums_style: true, dart3: true, dart_decl_base_output_path: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src", dart_impl_output_path: TargetOrCommonMap { common: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.dart", io: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.io.dart", web: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.web.dart" }, dart_entrypoint_class_name: "OrdDart", dart_preamble: "", dart_type_rename: {} }, 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: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0", extra_headers: "", dart_impl_output_path: TargetOrCommonMap { common: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.dart", io: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.io.dart", web: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\lib\\src\\frb_generated.web.dart" }, dart_output_class_name_pack: DartOutputClassNamePack { entrypoint_class_name: "OrdDart", api_class_name: "OrdDartApi", api_impl_class_name: "OrdDartApiImpl", api_impl_platform_class_name: "OrdDartApiImplPlatform", wire_class_name: "OrdDartWire", wasm_module_name: "OrdDartWasmModule" }, default_external_library_loader: GeneratorWireDartDefaultExternalLibraryLoaderInternalConfig { stem: "ord_dart", io_directory: "rust/target/release/", web_prefix: "pkg/" }, c_symbol_prefix: "frbgen_ord_dart_" }, rust: GeneratorWireRustInternalConfig { rust_crate_dir: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust", web_enabled: true, rust_output_path: TargetOrCommonMap { common: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.rs", io: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.io.rs", web: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.web.rs" }, c_symbol_prefix: "frbgen_ord_dart_", has_ffigen: false, default_stream_sink_codec: Sse, default_rust_opaque_codec: Moi, rust_preamble: "" }, c: GeneratorWireCInternalConfig { enable: false, rust_crate_dir: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust", rust_output_path: TargetOrCommonMap { common: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.rs", io: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.io.rs", web: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.web.rs" }, c_output_path: None, c_symbol_prefix: "frbgen_ord_dart_" } } }, polisher: PolisherInternalConfig { duplicated_c_output_path: [], dart_format_line_length: 80, add_mod_to_lib: true, build_runner: true, web_enabled: true, dart_root: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0", rust_crate_dir: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust", rust_output_path: TargetOrCommonMap { common: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.rs", io: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.io.rs", web: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\src\\frb_generated.web.rs" }, c_output_path: None, enable_auto_upgrade: true }, dumper: DumperInternalConfig { dump_contents: [], dump_directory: "\\\\?\\X:\\SDK\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\ord_dart-0.1.0\\rust\\target\\frb_dump" } }
SEVERE:   [2024-07-04T08:16:56.347Z DEBUG X:\SDK\rust\.cargo\registry\src\rsproxy.cn-0dccff568467c15b\flutter_rust_bridge_codegen-2.0.0\src\library\utils\dart_repository\dart_repo.rs:22] Guessing toolchain the runner is run into
SEVERE: 
SEVERE:   --- stderr
SEVERE:   Error: missing pubspec.lock in \\?\X:\SDK\Pub\Cache\hosted\pub.flutter-io.cn\ord_dart-0.1.0
SEVERE: --------------------------------------------------------------------------------
SEVERE: #0      runCommand (package:build_tool/src/util.dart:121:5)
SEVERE: #1      RustBuilder.build (package:build_tool/src/builder.dart:142:5)
SEVERE: <asynchronous suspension>
SEVERE: #2      ArtifactProvider.getArtifacts (package:build_tool/src/artifacts_provider.dart:71:25)
SEVERE: <asynchronous suspension>
SEVERE: #3      BuildGradle.build (package:build_tool/src/build_gradle.dart:35:23)
SEVERE: <asynchronous suspension>
SEVERE: #4      BuildGradleCommand.runBuildCommand (package:build_tool/src/build_tool.dart:65:5)
SEVERE: <asynchronous suspension>
SEVERE: #5      BuildCommand.run (package:build_tool/src/build_tool.dart:37:5)
SEVERE: <asynchronous suspension>
SEVERE: #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
SEVERE: <asynchronous suspension>
SEVERE: #7      runMain (package:build_tool/src/build_tool.dart:251:5)
SEVERE: <asynchronous suspension>
SEVERE: --------------------------------------------------------------------------------
SEVERE: BuildTool arguments: [build-gradle]
SEVERE: ================================================================================

Expected behavior

A package should not generate version-checked pubspec.lock.

Generated binding code

No response

OS

No response

Version of flutter_rust_bridge_codegen

No response

Flutter info

No response

Version of clang++

No response

Additional context

No response

fzyzcjy commented 3 months ago

Hmm, this looks like related to cargokit, thus may be great to ask there. I guess we can see how package like https://github.com/superlistapp/super_native_extensions/tree/main/super_clipboard which uses cargokit and does ignore the lock file can work.

AlexV525 commented 3 months ago

Just done with diffing with another plugin, it appears that the custom build.rs affects the build process which makes the tool try to seek for the pubspec.lock by manually calling the generate with the config.

https://github.com/AstroxNetwork/ord_dart/blob/0de5422542bd2c96f8dd868467102a70b74633d2/rust/build.rs

Removing that immediately solves the issue!

fzyzcjy commented 3 months ago

I see. Then looks like build.rs needs to be removed, since we surely do not want to run frb codegen when user installs a Dart package!

github-actions[bot] commented 3 months 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.