mustache icon indicating copy to clipboard operation
mustache copied to clipboard

My version is Dart 2.x ready, uses reflectable and is strong_mode compliant

Open MikeMitterer opened this issue 6 years ago • 6 comments

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

MikeMitterer avatar Jun 07 '18 17:06 MikeMitterer

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 .

xxgreg avatar Jun 07 '18 21:06 xxgreg

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...

MikeMitterer avatar Jun 08 '18 06:06 MikeMitterer

@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

blasten avatar May 01 '19 20:05 blasten

Sounds good to me.

xxgreg avatar May 01 '19 21:05 xxgreg

Any word on this? Id like to convert my project to aot but cant currently because of mustache

luaVolk avatar Jun 12 '19 05:06 luaVolk

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.

xxgreg avatar Jun 12 '19 22:06 xxgreg