gql icon indicating copy to clipboard operation
gql copied to clipboard

Patch commit introducing a breaking change

Open Pacane opened this issue 3 years ago • 9 comments

This commit https://github.com/gql-dart/gql/commit/8699d2fcc285789ec6e891b034e98fd2b7750296#diff-99580a029d7aed82312588b8cda13419bc8f9c0e58ac97e1f7bcdad51fc39c10R27

Changed the API and now 0.3.1 has a breaking change from 0.3.0.

I'm using other packages depending on ^0.3.0 and now after doing pub upgrade flutter can't build my project.

I think gql_exec should be bumped by a minor version, and all other packages depending on it explicitly should also be bumped.

Pacane avatar Dec 01 '21 14:12 Pacane

@Pacane Thanks for mentioning this, I will bump the versions on some of the packages.

agent3bood avatar Dec 01 '21 15:12 agent3bood

any update?

syssam avatar Dec 13 '21 13:12 syssam

Woking on bumping the versions of all packages, but I am having an issue with the CI checks. For the time being please use dependence overrides.

agent3bood avatar Dec 13 '21 15:12 agent3bood

I used dependency_overrides: gql_exec: 0.3.0 But still I am getting the error. /C:/Users/Sahil/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/gql_link-0.4.2-alpha+1635885531659/lib/src/response_parser.dart:17:9: Error: No named parameter with the name 'response'. response: body, ^^^^^^^^ /C:/Users/Sahil/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/gql_exec-0.3.0/lib/src/response.dart:20:9: Context: Found this candidate, but the arguments don't match. const Response({ ^^^^^^^^ /C:/Users/Sahil/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/gql_http_link-0.4.2-alpha+1635885531688/lib/src/link.dart:131:7: Error: No named parameter with the name 'response'. response: response.response, ^^^^^^^^ /C:/Users/Sahil/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/gql_exec-0.3.0/lib/src/response.dart:20:9: Context: Found this candidate, but the arguments don't match. const Response({ ^^^^^^^^

Anyother workaround ?

sahilmehra98 avatar Dec 14 '21 20:12 sahilmehra98

@saahilmehra try

dependency_overrides:
  gql_exec : 0.3.0
  gql_link: 0.4.0
  gql_http_link: 0.4.0

syssam avatar Dec 15 '21 11:12 syssam

I would like to catch the motivation to add the response inside the response construction, the code is undocumented and I would like to know more about this change.

Thanks!

vincenzopalazzo avatar Dec 17 '21 04:12 vincenzopalazzo

@vincenzopalazzo This is explained in the PR https://github.com/gql-dart/gql/pull/271

agent3bood avatar Dec 17 '21 08:12 agent3bood

@agent3bood Ops my fault I miss long the way the issue #271

vincenzopalazzo avatar Dec 17 '21 11:12 vincenzopalazzo

@syssam I tried using your solution but still getting the following error:

/C:/flutter/.pub-cache/hosted/pub.dartlang.org/gql_dio_link-0.1.0/lib/src/dio_link.dart:106:19: Error: Required named parameter 'response' must be provided.
    yield Response(
                  ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/gql_exec-0.3.2-alpha+1635885531651/lib/src/response.dart:23:9: Context: Found this candidate, but the arguments don't match.
  const Response({
        ^^^^^^^^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/graphql-5.0.1-beta.1/lib/src/core/query_manager.dart:427:23: Error: Required named parameter 'response' must be provided.
              Response(data: cachedData),
                      ^
/C:/flutter/.pub-cache/hosted/pub.dartlang.org/gql_exec-0.3.2-alpha+1635885531651/lib/src/response.dart:23:9: Context: Found this candidate, but the arguments don't match.
  const Response({
        ^^^^^^^^


FAILURE: Build failed with an exception.

* Where:
Script 'C:\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1070

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\flutter\bin\flutter.bat'' 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 48s
Exception: Gradle task assembleDebug failed with exit code 1

any other workaround guys?

kateile avatar Dec 25 '21 07:12 kateile