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.29k stars 301 forks source link

Using absolute Path as a rust-crate-dir argument will always be interpreted relative to project root #2334

Closed Vollbrecht closed 1 month ago

Vollbrecht commented 1 month ago

Describe the bug

Using absolute Path as a rust-crate-dir argument will always be interpreted relative to project root

Steps to reproduce

flutter_rust_bridge_codegen create flutter_app --rust-crate-name ble_bridge --rust-crate-dir /my/abs/path

will create a project that contains the rust-crate inside the root project and appends the absolute path as a relative path to it.

Logs

[2024-10-02T09:36:08.429Z INFO frb_codegen/src/library/commands/flutter.rs:23] Execute `flutter create flutter_app --template app` (this may take a while)
[2024-10-02T09:36:09.656Z INFO frb_codegen/src/library/integration/creator.rs:45] Step: Inject flutter_rust_bridge related code
[2024-10-02T09:36:09.657Z INFO frb_codegen/src/library/integration/integrator.rs:37] Overlay template onto project
[2024-10-02T09:36:09.661Z INFO frb_codegen/src/library/integration/integrator.rs:65] Modify file permissions
[2024-10-02T09:36:09.661Z INFO frb_codegen/src/library/integration/integrator.rs:68] Add pub dependencies
[2024-10-02T09:36:09.661Z INFO frb_codegen/src/library/commands/flutter.rs:32] Execute flutter pub add ble_bridge --path=rust_builder (this may take a while)
[2024-10-02T09:36:10.813Z INFO frb_codegen/src/library/commands/flutter.rs:32] Execute flutter pub add flutter_rust_bridge:2.4.0 (this may take a while)
[2024-10-02T09:36:12.079Z INFO frb_codegen/src/library/commands/flutter.rs:32] Execute flutter pub add integration_test --dev --sdk=flutter (this may take a while)
[2024-10-02T09:36:13.376Z INFO frb_codegen/src/library/integration/integrator.rs:76] Setup cargokit dependencies
[2024-10-02T09:36:13.376Z INFO frb_codegen/src/library/commands/flutter.rs:47] Execute `flutter pub get` inside "/home/.../rust/flutter/layout_test/flutter_app/rust_builder/cargokit/build_tool" (this may take a while)
[2024-10-02T09:36:14.361Z INFO frb_codegen/src/library/integration/integrator.rs:79] Apply Dart fixes
[2024-10-02T09:36:17.086Z INFO frb_codegen/src/library/integration/integrator.rs:82] Format Dart code

Expected behavior

No response

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

welcome[bot] commented 1 month ago

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

fzyzcjy commented 1 month ago

Saw your PR - looks great!

github-actions[bot] commented 1 month 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.