xclud / web3dart

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

2.4.0 conflicts with dart build runner #50

Open hamberluo opened 2 years ago

hamberluo commented 2 years ago
[WARNING] .dart_tool/build/entrypoint/build.dart:15: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 _i8;
       ^
.dart_tool/build/entrypoint/build.dart:43:45: Error: Undefined name 'abiGenerator'.
  _i1.apply(r'web3dart:abi_generator', [_i8.abiGenerator],
                                            ^^^^^^^^^^^^
.dart_tool/build/entrypoint/build.dart:48:59: Error: Undefined name 'deleteSource'.
  _i1.applyPostProcess(r'web3dart:delete_abi_source', _i8.deleteSource,
                                                          ^^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 3.2s

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

Any solution?

Herryjoeson commented 1 year ago

use 2.3.5

makinghappen commented 1 year ago

@xclud why did you remove builders in this commit? https://github.com/simolus3/web3dart/commit/9279ef70430ca187949a4b6529f2c7814192f0df

xclud commented 1 year ago

Builders depend on a lot of things that are needed only during build time. There's no reason to be bundled in the output project. That even makes more sense since the size of bundles matters and flutter for web is already slow enough.

The builders should be refactored out as a separate project and be listed under dev-dependencies.

migalv commented 1 year ago

So in the mean time we use v3.5.0? Or is there any solution?

hamberluo commented 1 year ago

Builders depend on a lot of things that are needed only during build time. There's no reason to be bundled in the output project. That even makes more sense since the size of bundles matters and flutter for web is already slow enough.

The builders should be refactored out as a separate project and be listed under dev-dependencies.

we've already included builder_runner in dev-dependencies. but when running build_runner, we got this error.

drshaggy commented 1 year ago

I still get this error even when using version 2.3.5, any ideas?

drshaggy commented 1 year ago

Solution for me was including build_web_compilers

inveker commented 1 year ago

@xclud Hi, Thank you for supporting this package! I took your message as a challenge and have created a web3dart_builders package which includes builders code from version 2.3.5.

It can be connected to web3dart 2.4.1v if you remove the build.yaml file from it

PS This is my first package on pub.dev, if you know how to improve it please email me alex.korolev.1995@gmail.com

emrbli commented 1 year ago

@xclud Hi, Thank you for supporting this package! I took your message as a challenge and have created a web3dart_builders package which includes builders code from version 2.3.5.

It can be connected to web3dart 2.4.1v if you remove the build.yaml file from it

PS This is my first package on pub.dev, if you know how to improve it please email me alex.korolev.1995@gmail.com

thank you @inveker , it's fixed