-
Notifications
You must be signed in to change notification settings - Fork 40
Add support for custom annotations (useful for reflectable) #51
Comments
This may not matter for you because you are discussing code generation, but it might still be useful for you to know that you can use other mechanisms in reflectable than direct annotation, if it is inconvenient to put actual You can use a global quantifier to attach a reflector to a given target class "at a distance": You can also use |
This might solve my problem. In PolymerDart
where
for every I still think it might be useful to be able to extends the code generator although I lost my example ;) |
Clearly, the reflectable transformer should never generate code that fails to compile, so it is a bug. It would be great if you could create such a new issue on reflectable! Another thing is that |
I think that the use case can be covered by making an (empty) mixin, and declaring your messages to mix that in. I made a small example here: https://github.com/sigurdm/reflect_proto_mixin. Given that I don't think we should add yet another dart-specific feature. Please reopen if there are more examples of things we cannot do without metadata. |
This bug might be the second incarnation of #29. PolymerDart 1.0 switched to reflectable to almost replace mirrors. If you want to use protobuf elements in PolymerDart templates these have to be reflectable using the JsProxy. This is done by the ReflectableTransformer that requires annotations on custom classes.
I would suggest adding support for custom annotations using the code generator.
The text was updated successfully, but these errors were encountered: