Closed cgarciae closed 9 years ago
This is my main file where the error is supposed to occure
import 'package:angular/angular.dart';
import 'package:angular/routing/module.dart';
import 'package:angular/application_factory.dart';
import 'package:logging/logging.dart';
import 'package:redstone_mapper/mapper_factory.dart';
import 'package:aristadart/arista_client.dart';
@MirrorsUsed(targets: const[
'angular',
'angular.core',
'angular.core.dom',
'angular.filter',
'angular.perf',
'angular.directive',
'angular.routing',
'angular.core.parser',
'NodeTreeSanitizer'
],
override: '*')
import 'dart:mirrors';
class MyAppModule extends Module
{
MyAppModule()
{
bind (LoginVista);
bind (HomeVista);
bind (EventoVista);
bind (VistaVista);
bind (NuevoUsuarioVista);
bind (AdminVista);
bind (ModelVista);
bind (TargetVista);
bind (RouteInitializerFn, toValue: recipeBookRouteInitializer);
bind (NgRoutingUsePushState, toValue: new NgRoutingUsePushState.value(false));
}
}
void main()
{
bootstrapMapper();
Logger.root.level = Level.FINEST;
Logger.root.onRecord.listen((LogRecord r) { print(r.message); });
applicationFactory()
.addModule(new MyAppModule())
.rootContextType (MainController)
.run();
}
Try to add a library directive to your main script. Example:
library aristadart.main
You can also heck if all imported scripts has a library directive.
Thanks, will try.
@luizmineo I pinned it down and found the problem (again) is
class MapResp extends Resp
{
@Field() Map map;
}
The problem here is that the map
field has no type parameters (for example: Map<String, MyObject> map
). I've published redstone_mapper v0.1.13 with a fix that prevents the transformer from crashing in this case, but it's still unable to properly encode or decode Map and List objects without type parameters.
Yeah, I used it to see if a could avoid creating a class for the time being, but I don't think it would be a good practice.
Can you confirm that the fix solved the problem for you?
I am getting this error when I try to build. I really don't know what may cause it but it fatal since I cant deploy :(