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.15k stars 286 forks source link

`flutter_rust_bridge_codegen create` fails because dependency conflict #1570

Closed NoelJacob closed 8 months ago

NoelJacob commented 8 months ago

Describe the bug

Fails with the output

Steps to reproduce

run frb generate

Logs

flutter_rust_bridge_codegen create spacehub
[2023-12-31T19:58:06.748Z INFO frb_codegen/src/library/commands/flutter.rs:8] Execute `flutter create spacehub`
[2023-12-31T19:58:09.627Z INFO frb_codegen/src/library/integration/creator.rs:18] Step: Inject flutter_rust_bridge related code
[2023-12-31T19:58:09.628Z INFO frb_codegen/src/library/commands/flutter.rs:14] Execute flutter pub add ["rust_builder", "--path=rust_builder"]
[2023-12-31T19:58:12.910Z INFO frb_codegen/src/library/commands/flutter.rs:14] Execute flutter pub add ["flutter_rust_bridge:2.0.0-dev.9"]
[2023-12-31T19:58:16.144Z INFO frb_codegen/src/library/commands/flutter.rs:14] Execute flutter pub add ["ffigen:8.0.2", "--dev"]
[2023-12-31T19:58:19.650Z INFO frb_codegen/src/library/commands/flutter.rs:14] Execute flutter pub add ["integration_test", "--dev", "--sdk=flutter"]
[2023-12-31T19:58:22.856Z WARN frb_codegen/src/library/commands/command_runner.rs:133] command="sh" "-c" "\"flutter\" \"pub\" \"add\" \"integration_test\" \"--dev\" \"--sdk=flutter\"" stdout= stderr=Note: file is pinned to version 7.0.0 by integration_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because every version of integration_test from sdk depends on file 7.0.0 and ffigen >=2.0.0 <9.0.0 depends on file ^6.0.0, integration_test from sdk is incompatible with ffigen >=2.0.0 <9.0.0.
So, because spacehub depends on both ffigen 8.0.2 and integration_test from sdk, version solving failed.

Error: Command execution failed: Note: file is pinned to version 7.0.0 by integration_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.

Because every version of integration_test from sdk depends on file 7.0.0 and ffigen >=2.0.0 <9.0.0 depends on file ^6.0.0, integration_test from sdk is incompatible with ffigen >=2.0.0 <9.0.0.
So, because spacehub depends on both ffigen 8.0.2 and integration_test from sdk, version solving failed.


### 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_

### Version of `ffigen`

_No response_

### Additional context

_No response_
fzyzcjy commented 8 months ago

Hi, which flutter version are you using? I guess this is because your Flutter is not latest stable (IIRC flutter officially supports latest stable)

NoelJacob commented 8 months ago

Yup works with flutter stable. Thanks❤️

fzyzcjy commented 8 months ago

You are welcome!

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