onepub-dev / dcli

An extensive library and tooling for building console/cli applications and scripts using the Dart programming language.
245 stars 26 forks source link

Failed to build dcli:dcli #193

Closed Dahkenangnon closed 2 years ago

Dahkenangnon commented 2 years ago

Describe the bug This is encountered when installing dcli

To Reproduce dcli install

Expected behavior dcli installed on my machine

Logs Failed to build dcli:dcli: /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.17.5/lib/src/util/wait_for_ex.dart:42:13: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace(e.error, merged); ^^^^^^^^^^^^^^^^^^^ /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.17.5/lib/src/util/wait_for_ex.dart:64:11: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace(exception, merged); Run dcli doctor: From the cli run dcli doctor

Paste the output from dcli doctor here

C:\dev\sharedcode\PhpFromZero> dcli doctor Building package executable... Failed to build dcli:dcli: /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.17.5/lib/src/util/wait_for_ex.dart:42:13: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace(e.error, merged); ^^^^^^^^^^^^^^^^^^^ /C:/Users/justi/AppData/Local/Pub/Cache/hosted/pub.dartlang.org/dcli-1.17.5/lib/src/util/wait_for_ex.dart:64:11: Error: Member not found: 'Error.throwWithStackTrace'. Error.throwWithStackTrace(exception, merged); ^^^^^^^^^^^^^^^^^^^

Additional context Add any other context about the problem here.

passsy commented 2 years ago

dcli 1.17+ requires Dart 2.16

Dahkenangnon commented 2 years ago

Upgrading my dart sdk version solved the problem as @passsy said.

Thank @passsy

bsutton commented 2 years ago

I believe I've fixed this. I've released 1.19.2 which works with dart 2.12 + I've also released 1.20.0 which works with dart 2.16+ 2.16 will be the requirement going forward but I wanted to ensure we had a working version for users on the older dart versions.

bsutton commented 2 years ago

Nope, I managed to get it wrong again.

So the versions are: 1.20.1 for dart 2.12 1.30.0 for dart 2.16.

I will be adding some additional checks to the build environment to avoid this type of issue going forward.