xclud / web3dart

Ethereum library, written in Dart.
https://pub.dev/packages/web3dart
MIT License
171 stars 94 forks source link

how to generate .g.dart as you remove lib/src/builder? #39

Open CrashHunter opened 2 years ago

CrashHunter commented 2 years ago

how to generate .g.dart as you remove lib/src/builder?

oliverbytes commented 2 years ago
Olivers-MacBook-Pro:app nemorystudios$ fvm flutter packages pub run build_runner build --delete-conflicting-outputs
[INFO] Generating build script...
[INFO] Generating build script completed, took 592ms

[INFO] Precompiling build script......
[WARNING] .dart_tool/build/entrypoint/build.dart:11:8: Error: Error when reading '../../../../../.pub-cache/hosted/pub.dartlang.org/web3dart-2.4.0/lib/src/builder/builders.dart': No such file or directory
import 'package:web3dart/src/builder/builders.dart' as _i4;
       ^
.dart_tool/build/entrypoint/build.dart:25:45: Error: Undefined name 'abiGenerator'.
  _i1.apply(r'web3dart:abi_generator', [_i4.abiGenerator],
                                            ^^^^^^^^^^^^
.dart_tool/build/entrypoint/build.dart:29:59: Error: Undefined name 'deleteSource'.
  _i1.applyPostProcess(r'web3dart:delete_abi_source', _i4.deleteSource,
                                                          ^^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 1.0s

[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

pub finished with exit code 78
Olivers-MacBook-Pro:app nemorystudios$ 

I second this. I'm getting the above error now when I run build runner

mgmix commented 2 years ago

I'm having the same problem. I think this problem will be solved through this Pull Request #30

Galti commented 2 years ago

You can downgrade to 2.3.5 temporarily, until this issue is solved. I guess this PR will solve the issue.