Aqueduct build fails with latest Dart SDK (2.10.1) on 4.0.0-b1
alexantenna opened this issue · 2 comments
alexantenna commented
Hi! Just curious is aqueduct build
is compatible with latest SDK. aqueduct serve
works just well!
-- Aqueduct CLI Version: 4.0.0-b1
-- Aqueduct project version: 4.0.0-b1
Resolving ASTs...
Generating runtime...
*** Uncaught error
Bad state: Failed assertion: boolean expression must not be null
**** Stacktrace
* #0 ElementDisplayStringBuilder._writeNullability (package:analyzer/src/dart/element/display_string_builder.dart:252:9)
* #1 ElementDisplayStringBuilder.writeInterfaceType (package:analyzer/src/dart/element/display_string_builder.dart:152:5)
* #2 InterfaceTypeImpl.appendTo (package:analyzer/src/dart/element/type.dart:840:13)
* #3 TypeImpl.getDisplayString (package:analyzer/src/dart/element/type.dart:1696:5)
* #4 ManagedEntityRuntimeImpl._getValidatorConstructionFromAnnotation (package:aqueduct/src/runtime/orm_impl.dart:118:16)
* #5 ManagedEntityRuntimeImpl._getValidators.<anonymous closure> (package:aqueduct/src/runtime/orm_impl.dart:156:30)
* #6 MappedListIterable.elementAt (dart:_internal/iterable.dart:417:31)
* #7 ListIterator.moveNext (dart:_internal/iterable.dart:343:26)
* #8 ExpandIterator.moveNext (dart:_internal/iterable.dart:483:21)
* #9 new List.from (dart:core-patch/array_patch.dart:50:19)
* #10 new List.of (dart:core-patch/array_patch.dart:68:17)
* #11 Iterable.toList (dart:core/iterable.dart:404:12)
* #12 ManagedEntityRuntimeImpl._getValidators (package:aqueduct/src/runtime/orm_impl.dart:160:10)
* #13 ManagedEntityRuntimeImpl._getAttributeInstantiator (package:aqueduct/src/runtime/orm_impl.dart:248:15)
* #14 ManagedEntityRuntimeImpl._getEntityConstructor.<anonymous closure> (package:aqueduct/src/runtime/orm_impl.dart:288:26)
* #15 MappedIterator.moveNext (dart:_internal/iterable.dart:392:20)
* #16 Iterable.join (dart:core/iterable.dart:368:19)
* #17 ManagedEntityRuntimeImpl._getEntityConstructor (package:aqueduct/src/runtime/orm_impl.dart:289:8)
* #18 ManagedEntityRuntimeImpl.compile (package:aqueduct/src/runtime/orm_impl.dart:396:9)
* #19 Build.execute.<anonymous closure> (package:runtime/src/build.dart:31:45)
* #20 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:377:8)
* #21 Build.execute (package:runtime/src/build.dart:28:34)
* <asynchronous suspension>
* #22 BuildExecutable.execute (<data:application/dart>:13:259)
* #23 main (<data:application/dart>:9:35)
* #24 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:32)
* #25 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)
****
Reductions commented
Yes there is non documented breaking change in dart 2.9.0. The problem is fixed in master.
If you want to use it you could do one of 2 thigns:
git clone "$aqueductRepo" "$somePath"
pub global activate --source "$somePath/aqueduct"
or you could override your aqueduct dependency to point to current master head commit and run the command like this:
pub run aqueduct build
alexantenna commented
Thanks!