CashlessSociety / together_app

Together Project
https://togetherproject.nz
9 stars 1 forks source link

Can't build : Error: No named parameter with the name 'options'. #58

Closed utunga closed 2 years ago

utunga commented 2 years ago

I can't seem to build the code onprofile-header-update branch

I checked out and did a git pull then build, well clean then packages get then build and get compilation fail.

~/cashless/together_app profile-header-update*
❯ flutter clean
Cleaning Xcode workspace...                                         5.6s
Deleting build...                                                1,061ms
Deleting .dart_tool...                                              75ms
Deleting .packages...                                                0ms
Deleting Generated.xcconfig...                                       0ms
Deleting flutter_export_environment.sh...                            0ms
Deleting .flutter-plugins-dependencies...                            0ms
Deleting .flutter-plugins...                                         0ms

❯ flutter packages get
Warning: You are using these overridden dependencies:
! font_awesome_flutter 10.0.0-beta from path font_awesome_flutter
Running "flutter pub get" in together_app...                        4.1s
❯ flutter build apk

💪 Building with sound null safety 💪

../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.2-beta.7/lib/src/widgets/hooks/subscription.dart:33:13: Error: No named parameter with the name 'options'.
            options: options,
            ^^^^^^^
../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.2-beta.6/lib/src/core/query_result.dart:68:11: Context: Found this candidate, but the arguments don't match.
  factory QueryResult.optimistic({
          ^^^^^^^^^^
../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.2-beta.7/lib/src/widgets/hooks/subscription.dart:35:31: Error: No named parameter with the name 'options'.
        : QueryResult.loading(options: options),
                              ^^^^^^^
../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.2-beta.6/lib/src/core/query_result.dart:58:11: Context: Found this candidate, but the arguments don't match.
  factory QueryResult.loading({
          ^^^^^^^
../../dev/flutter/.pub-cache/hosted/pub.dartlang.org/graphql_flutter-5.0.2-beta.7/lib/src/hive_init.dart:27:15: Error: Member not found: 'HiveStore.init'.
    HiveStore.init(onPath: path);
              ^^^^

FAILURE: Build failed with an exception.

* Where:
Script '/Users/utunga/dev/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1102

* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/utunga/dev/flutter/bin/flutter'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 18s
Running Gradle task 'assembleRelease'...                           19.4s
Gradle task assembleRelease failed with exit code 1
utunga commented 2 years ago

Problem due to versioning - had to pin graphql-flutter to specific version to fix.. graphql_flutter: 5.0.2-beta.6

What happens when they release 5.0.3 though?

mjxchina commented 2 years ago

I think the solution here is that the version of graphql_flutter and graphql packages should sync up correctly. So as long as we are using the latest version of both packages, things should be fine.

utunga commented 2 years ago

ah.. ! That would be good... and make sense