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

chopper_generator 7.0.7 is broken #546

Closed
Dimous opened this issue Jan 5, 2024 · 3 comments · Fixed by #549
Closed

chopper_generator 7.0.7 is broken #546

Dimous opened this issue Jan 5, 2024 · 3 comments · Fixed by #549
Assignees
Labels
bug Something isn't working

Comments

@Dimous
Copy link

Dimous commented Jan 5, 2024

Hello!
I updated chopper_generator from 7.0.6 to 7.0.7 and it stopped working.

dart run build_runner build output [SEVERE] chopper_generator on lib/data/client/service/rate_service.dart:

Could not format because the source could not be parsed:

line 11, column 70 of .: Expected to find ','.

11 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^

line 11, column 73 of .: Expected to find ','.

11 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^^^^^^^^^^^^^^^^^

[SEVERE] chopper_generator on lib/data/client/service/review_service.dart:

Could not format because the source could not be parsed:

line 11, column 70 of .: Expected to find ','.

11 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^

line 11, column 73 of .: Expected to find ','.

11 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^^^^^^^^^^^^^^^^^

line 15, column 70 of .: Expected to find ','.

15 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^

line 15, column 73 of .: Expected to find ','.

15 │ return client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^^^^^^^^^^^^^^^^^

[SEVERE] chopper_generator on lib/data/client/service/user_service.dart:

Could not format because the source could not be parsed:

line 14, column 102 of .: Expected to find ','.

14 │ return client.send<Map<String, dynamic>, Map<String, dynamic>>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^

line 14, column 105 of .: Expected to find ','.

14 │ return client.send<Map<String, dynamic>, Map<String, dynamic>>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^^^^^^^^^^^^^^^^^
line 18, column 74 of .: Expected to find ','.

18 │ return client.send<String, String>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^

line 18, column 77 of .: Expected to find ','.

18 │ return client.send<String, String>($request, requestConverter: Instance of 'BinaryExpression', ); }
│ ^^^^^^^^^^^^^^^^^^

Dependency Version
chopper 7.0.10
chopper_generator 7.0.7
build_runner ^2.4.7
analyzer ^6.3.0
_fe_analyzer_shared ^65.0.0

When I rollback (¡only dependency!) chopper_generator to 7.0.6 it is working again.

@Dimous Dimous added the bug Something isn't working label Jan 5, 2024
@Guldem
Copy link
Contributor

Guldem commented Jan 5, 2024

I can't reproduce it do you have some example code of the service its trying to create?

@Dimous
Copy link
Author

Dimous commented Jan 5, 2024

Please, have a look -- https://github.com/Dimous/issue-546/blob/main/lib/rate_service.dart

PS C:\Users\kasim\Desktop\issue-546\issue_546> dart run build_runner build
[INFO] Generating build script completed, took 1.5s
[INFO] Reading cached asset graph completed, took 437ms
[INFO] Checking for updates since last build completed, took 3.7s
[SEVERE] chopper_generator on lib/rate_service.dart:

Could not format because the source could not be parsed:

line 11, column 70 of .: Expected to find ','.
   ╷
11 │ return  client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
   │                                                                      ^^
   ╵
line 11, column 73 of .: Expected to find ','.
   ╷
11 │ return  client.send<void, void>($request, requestConverter: Instance of 'BinaryExpression', ); }
   │                                                                         ^^^^^^^^^^^^^^^^^^
   ╵
[INFO] Running build completed, took 15.1s
[INFO] Caching finalized dependency graph completed, took 244ms
[SEVERE] Failed after 15.4s

@techouse techouse self-assigned this Jan 6, 2024
@techouse
Copy link
Collaborator

techouse commented Jan 6, 2024

Thanks for the bug report!

Looks like it's starts working again when you quote out this line

@FactoryConverter(request: FormUrlEncodedConverter.requestFactory)

so I might have a clue where it's coming from.

EDIT:
I've made a PR #549 fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants