chopper icon indicating copy to clipboard operation
chopper copied to clipboard

Failed pub run build_runner build

Open JosephNK opened this issue 2 years ago • 1 comments

This is the package information currently being used. (pubspec.yaml)

dependencies:
  ...
  connectivity_plus: ^2.3.6
  chopper: ^4.0.6

dev_dependencies:
  ...
  built_value_generator: ^8.4.0
  build_runner: ^2.2.0
  chopper_generator: ^4.0.6

When I run the pub run build_runner build --delete-conflicting-outputs command, I get an error from the wrong place as shown below.

Console Log

...

[INFO] Caching finalized dependency graph completed, took 51ms

[SEVERE] chopper_generator:chopper_generator on example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux/test/connectivity_plus_linux_test.dart (cached):

line 1, column 374 of asset:flutter_app/example/linux/flutter/ephemeral/.plugin_symlinks/connectivity_plus_linux/test/connectivity_plus_linux_test.dart: Could not resolve annotation for `void main()`.
  ╷
1 │ @GenerateMocks([NetworkManagerClient])
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
[SEVERE] Failed after 91ms
pub finished with exit code 1

Please tell me how to solve it.

JosephNK avatar Aug 03 '22 15:08 JosephNK

Hmm, check if it's related to the recent update of the http library https://pub.dev/packages/http/changelog#0135

techouse avatar Aug 06 '22 07:08 techouse