Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Breaking change introduced required parameter parseErrorData to FlutterRustBridgeSyncTask in a minor version increase. #1386

Closed
juancastillo0 opened this issue Oct 9, 2023 · 4 comments
Labels
bug Something isn't working wontfix This will not be worked on

Comments

@juancastillo0
Copy link

juancastillo0 commented Oct 9, 2023

Describe the bug

Hi! Thank for your work!

Breaking change introduced required parameter parseErrorData to FlutterRustBridgeSyncTask in a minor version increase.

Uploaded packages errors out since the latest version contains the required parameter, but the generated code uploaded to pub.dev was generated with a previous version.

I am not sure if this package follows semver, but I could not find documentation for it (or the way the versions represent breaking changes) and the suggested version constraint in the template is open (^) as if following semver.

Thanks again

Codegen logs with RUST_LOG=debug environment variable

Failed to load "test/wasm_interface_test.dart":
  lib/src/bridge_generated.dart:1949:59: Error: Required named parameter 'parseErrorData' must be provided.
      return _platform.executeSync(FlutterRustBridgeSyncTask(
                                                            ^
/opt/hostedtoolcache/flutter/beta-3.15.0-15.2.pre-x64/.pub-cache/hosted/pub.dev/flutter_rust_bridge-1.82.1/lib/src/basic.dart:205:9: Context: Found this candidate, but the arguments don't match.
    const FlutterRustBridgeSyncTask({
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  lib/src/bridge_generated.dart:1966:57: Error: Required named parameter 'parseErrorData' must be provided.
      return _platform.executeNormal(FlutterRustBridgeTask(
                                                          ^

To Reproduce

Use version 1.70 to generate the bindings and then use version 1.80 to run the 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

Version of ffigen

No response

Additional context

No response

@juancastillo0 juancastillo0 added the bug Something isn't working label Oct 9, 2023
@welcome
Copy link

welcome bot commented Oct 9, 2023

Hi! Thanks for opening your first issue here! 😄

@fzyzcjy
Copy link
Owner

fzyzcjy commented Oct 9, 2023

You are absolutely right! It is a problem that frb does not strictly follow semver, I will try to follow in the future when possible.

There are some problems though: Currently, I hope to keep the Rust and Dart's frb's versions exactly the same to make it simpler to use the correct version. Then, if the Dart side make a breaking change, and we follow semver, then the Rust side will have to be bumped to 2.x even if the Rust side has no breaking change. Then comes the problem: Years ago I was faced with the limit rust-lang/cargo#5640 (and it seems not implemented yet), thus end users cannot easily specify dependency overrides if we make a major version bump in rust. That will not be a super convenient feature to have :/

Copy link

stale bot commented Dec 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Dec 8, 2023
@stale stale bot closed this as completed Dec 16, 2023
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants