redstone-dart / redstone_mapper

A mapper plugin for Redstone.dart
MIT License
9 stars 10 forks source link

client_test doesn't compile #18

Closed sestegra closed 8 years ago

sestegra commented 8 years ago

Environment

Scenario

Results

$ pub build test
Loading source assets... 
Loading di/module_transformer and redstone_mapper transformers... (1.2s) 
Building redstone_mapper... (4.5s) 
[Info from Dart2JS]:
Compiling redstone_mapper|test/client_test_static_mapper.dart...
[Warning from Dart2JS]:
test/client_test_static_mapper.dart:
Could not find 'main'.
Try adding a method named 'main' to your program.
[Info from Dart2JS]:
Took 0:00:02.708595 to compile redstone_mapper|test/client_test_static_mapper.dart.
[Info from Dart2JS]:
Compiling redstone_mapper|test/client_test.dart...
[Dart2JS on redstone_mapper|test/client_test.dart]:
test/client_test_static_mapper.dart:28:61:
Expected an expression, but got 'class'.
final Map<Type, TypeInfo> types = <Type, TypeInfo>{import_0.class ValidationError: new TypeInfo((obj, factory, fieldEncoder, typeCodecs) {
                                                            ^^^^^
[Dart2JS on redstone_mapper|test/client_test.dart]:
test/client_test_static_mapper.dart:28:27:
A final variable must be initialized.
Try adding an initializer or removing the 'final' modifier.
final Map<Type, TypeInfo> types = <Type, TypeInfo>{import_0.class ValidationError: new TypeInfo((obj, factory, fieldEncoder, typeCodecs) {
                          ^^^^^
[Info from Dart2JS]:
Took 0:00:03.094908 to compile redstone_mapper|test/client_test.dart.
Build failed.
sestegra commented 8 years ago

I will help to fix that issue as soon as I understand

Pacane commented 8 years ago

pub build/serve will not work on a server side lib.

For the test framework, I think the readme here contains good docs.

As for the transformers, they'll only work on client side lib AFAIK.