Chciałem eksperymentować przy użyciu kompilatora Dart dev, który generuje ES6. Zainstalowałem goCzy ktoś dostał Dev_compiler Dart do pracy?
pub global activate -sgit [email protected]:dart-lang/dev_compiler.git
Potem stworzył prostą klasę Dart:
library wat;
class Person {
String first_name;
String last_name;
int amountOfAwesomeness;
Person(this.first_name, this.last_name, [this.amountOfAwesomeness = 0]);
String get name => "$first_name $last_name is awesome:$amountOfAwesomeness";
}
Potem próbował go skompilować:
dartdev -o ./ person.dart
ale otrzymuję wyjątek:
Unhandled exception:
'package:dev_compiler/src/dependency_graph.dart': Failed assertion: line 60 pos 16: 'false' is not true.
#0 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:27)
#1 SourceGraph.nodeFromUri.<anonymous closure> (package:dev_compiler/src/dependency_graph.dart:60:16)
#2 _CompactLinkedHashMap.putIfAbsent (dart:collection-patch/compact_hash.dart:193)
#3 SourceGraph.nodeFromUri (package:dev_compiler/src/dependency_graph.dart:50:29)
#4 Compiler.Compiler (package:dev_compiler/devc.dart:76:38)
#5 main (http://localhost:60878/devc.dart:42:22)
#6 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:253)
#7 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:142)
Wydaje się być prostym przykładem, takim jak ten d pracy. Co ja robię źle? Czy dev_compiler nie jest jeszcze gotowy do wypróbowania?
Ddc to super duper mega early. Najlepsze do zgłaszania błędów tutaj: https://github.com/dart-lang/dev_compiler/issues –