dart-archive / polymer-dart

Polymer support for Dart
https://pub.dartlang.org/packages/polymer
BSD 3-Clause "New" or "Revised" License
180 stars 33 forks source link

Migrate to reflectable #540

Closed jakemac53 closed 9 years ago

jakemac53 commented 9 years ago

The tests don't pass once transformed currently, but I wanted to send this out anyways to get feedback since the issues are most likely related to the reflectable transformer itself, not these changes.

Closes https://github.com/dart-lang/polymer-dart/issues/535

jakemac53 commented 9 years ago

cc @eernstg

jakemac53 commented 9 years ago

fwiw, here are the logs from pub serve https://gist.github.com/jakemac53/1b3100373f1c4df18d05

donny-dont commented 9 years ago

@jakemac53 does anything like https://github.com/dart-lang/smoke/issues/21 need to be added to reflectable?

jakemac53 commented 9 years ago

@donny-dont reflectable doesn't provide a way of querying for all declarations including super class declarations at all (that I know of at least). Since we are walking up the super chain manually anyways (see declarationsFor in declarations.dart), I went ahead and implemented the same semantics there.

It is possible that we would just re-implement smoke on top of reflectable since it does provide some nice abstractions, but that is a larger endeavor ;).

donny-dont commented 9 years ago

Okay cool I can try it out and make sure everythings working as advertised. Glad to see you back on it :+1:

jakemac53 commented 9 years ago

@donny-dont fyi you will need to locally clone the reflectable package (https://github.com/dart-lang/reflectable) since its layout isn't currently compatible with a git dependency and its not yet published to pub afaik. Also you will need to add the reflectable transformer, and the list of entry points it accepts should point to the .dart files, not the .html files like the old polymer transformer. I am also currently getting some errors in the transformer so its likely that you will have issues in pub serve/build, but a regular server should work fine.

jakemac53 commented 9 years ago

this has been merged into the reflectable branch, closing.