mustache
mustache copied to clipboard
My version is Dart 2.x ready, uses reflectable and is strong_mode compliant
Hi Greg, I forked your version a couple of hours ago and made it D2.x ready, strong_mode compliant. My version uses reflectable 2.x - so no mirrors!
All tests are on green
pub run build_runner test
pub run build_runner test -- -p chrome
Browser-sample works - webdev serve
I trie to make a PR but somehow it fails... Here is my version: https://github.com/MikeMitterer/mustache
Maybe you can clone it to an extra branch on your side, check it out, and... :-))), if everything is OK on your side, release it to pub
Thanks for the input. I don't have a lot of time to work on this - so this isn't a promise. What I was thinking about doing is having two entry points for the library. The existing one will support mirrors as it does now - this works well for VM apps. The new entry point will be mustache_no_mirrors.dart, and allow the user to pass a "value resolver" function i.e. "dynamic valueResolver(dynamic object, String name)". The end user can then plug in whichever approach they like - for example reflectable.
On Fri, 8 Jun 2018 at 05:50, Mike Mitterer [email protected] wrote:
Hi Greg, I forked your version a couple of hours ago and made it D2.x ready, strong_mode compliant. My version uses reflectable 2.x - so no mirrors!
All tests are on green
pub run build_runner test pub run build_runner test -- -p chrome
Browser-sample works - webdev serve
I trie to make a PR but somehow it fails... Here is my version: https://github.com/MikeMitterer/mustache
Maybe you can clone it to an extra branch on your side, check it out, and... :-))), if everything is OK on your side, release it to pub
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xxgreg/mustache/issues/39, or mute the thread https://github.com/notifications/unsubscribe-auth/AAACwCpzZnbPV5iWD5F9MU0K24Qa2yYpks5t6WfcgaJpZM4Ue2LE .
Why do you think this is necessary? I mean two entry points? All your VM examples work fine e.g.
dart lambdas.dart
Have you tried my version? There is no need for mirrors anymore...
@xxgreg I'm happy to create the two entry points as you suggested. How does that sound? We need this in the Flutter tool see https://github.com/flutter/flutter/issues/31803
Sounds good to me.
Any word on this? Id like to convert my project to aot but cant currently because of mustache
If you're just using maps and don't need reflection, it's a pretty minimal change to remove the mirrors support. See: Rendered._getNamedProperty()
Apologies I can't be of more help.