polymer.dart 0.10.0-pre.5 (pre-release)

158 views
Skip to first unread message

Siggi Cherem

unread,
Mar 31, 2014, 5:01:57 PM3/31/14
to w...@dartlang.org
Hey everyone,

If you've been playing with the polymer pre-releases, then check out the version we pushed last Friday (0.10.0-pre.5).

What's new in 0.10.0-pre.5?
The polymer-build process removes all dependencies on 'dart:mirrors' in polymer apps, and replaces those with generated code.

Why avoid mirrors?
Removing uses of mirrors helps dart2js do a better job optimizing your code (creating smaller, possibly faster apps). What I'm most excited about is that, as a developer, you won't need to worry about @reflectable or @MirrorsUsed anymore. If an expression is mentioned in a template, then we include it in the generated code. The idea is that if it works in Dartium, it should work after we compile it with dart2js without having to add any extra annotations. 

How do I use it?
Upgrade to 0.10.0-pre.5 and invoke pub build.

Some details you should be aware of:
  • In order to generate the appropriate information, we have to analyze your program in more detail. This means in part that compilation might be slower (we use the analyzer's resolver in our pub-build), but more importantly, that we need to be able to extract expressions in templates and figure out which classes correspond with polymer-element tags. This works great if you are using polymer the usual way, but it might not work property if you override the template expression syntax or if you rely heavily on calling Polymer.register instead of using @CustomTag.

  • Some breaking changes were introduced along the way. For example, evaluation of polymer expressions and path-observers may throw exceptions when it didn't use to do so. So you may discover that some parts of your apps need to be fixed as you try things out.

Please give it a try and let us know how it's working out for you. So far, we've tried this in TodoMVC and the dardoc-viewer app, but I'm sure we'll discover bugs as we try this on other apps out there. If it doesn't work for you, you can always revert back an older package (polymer 0.10.0-pre.4) or tweak your code to make it default to the old behavior. Hopefully this wont be necessary, but let us know if you need more details.

Cheers,
Siggi

Don Olmstead

unread,
Mar 31, 2014, 6:57:40 PM3/31/14
to w...@dartlang.org
Hey Siggi,

Has anyone tried the build process with PolymerElements that have mixins? I use mixins heavily in my polymer library and some of them have been exposed using the @MirrorsUsed annotations.

Cheers,
Don


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.
To view this discussion on the web visit https://groups.google.com/a/dartlang.org/d/msgid/web/CAJmP2_qvi0H5XaD513CCwHiZzYGS0iWK1yu4LayWQw4%2B4g%3DpRg%40mail.gmail.com.

Siggi Cherem

unread,
Mar 31, 2014, 7:42:36 PM3/31/14
to w...@dartlang.org
Hey Don,

We have not tried that specifically, but the new compiler is designed to support it. So let us know if that doesn't work for you. It sounds like a good idea to add some tests for it, though. I created a bug so we don't forget (issue 17928).

Cheers,
Siggi


Don Olmstead

unread,
Mar 31, 2014, 11:03:19 PM3/31/14
to w...@dartlang.org
Was there any progress on https://code.google.com/p/dart/issues/detail?id=17739 that was the reason I hadn't migrated to 0.10.


Siggi Cherem

unread,
Mar 31, 2014, 11:26:13 PM3/31/14
to w...@dartlang.org
Ah, yes! that is also fixed in 0.10.0-pre.5. Thanks for reminding me, I'll update the bug shortly.

Cheers,
Siggi


tomasz.kubacki

unread,
Apr 1, 2014, 12:16:18 AM4/1/14
to w...@dartlang.org
Hi Siggi,

0.10.0-pre.5 - works great for my two not so small projects.

 seems like a low hanging fruit fix :)

Cheers,
t.k

Günter Zöchbauer

unread,
Apr 1, 2014, 2:49:35 AM4/1/14
to w...@dartlang.org
I already upgraded to pre.5 but
sadly this issue https://code.google.com/p/dart/issues/detail?id=17914
prevents me from building the bigger part all of my example pages.


Don Olmstead

unread,
Apr 4, 2014, 2:19:26 PM4/4/14
to w...@dartlang.org
I did the update to pre.6 last night and can build again! There were no problems with the mixins and the const bug is gone. Thanks for getting that sorted Siggi!

The only issue I'm still experiencing is the package paths being borked when you nest inside web or example, https://code.google.com/p/dart/issues/detail?id=17596.

Also just wondering if there's some reason why I always need Experimental Web Platform Features enabled. A good chunk of the components break without it.


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.

Don Olmstead

unread,
Apr 4, 2014, 2:51:01 PM4/4/14
to w...@dartlang.org
Also I've been wondering do we need the build.dart anymore?

John Messerly

unread,
Apr 4, 2014, 5:32:52 PM4/4/14
to w...@dartlang.org, Vijay Menon
On Fri, Apr 4, 2014 at 11:19 AM, Don Olmstead <don.j.o...@gmail.com> wrote:
I did the update to pre.6 last night and can build again! There were no problems with the mixins and the const bug is gone. Thanks for getting that sorted Siggi!

The only issue I'm still experiencing is the package paths being borked when you nest inside web or example, https://code.google.com/p/dart/issues/detail?id=17596.

Also just wondering if there's some reason why I always need Experimental Web Platform Features enabled. A good chunk of the components break without it.

yeah :(. All of the Shadow CSS is broken without this flag. I talked to Vijay, but we were inclined to wait for Dartium to update to Chrome 35, which has the relevant features turned out.

but in the meantime, my recommendation is definitely "turn that flag on!"

On Fri, Apr 4, 2014 at 11:51 AM, Don Olmstead <don.j.o...@gmail.com> wrote:
Also I've been wondering do we need the build.dart anymore?

you don't need it, but it does still provide the HTML warnings in the editor.

Don Olmstead

unread,
Apr 4, 2014, 5:44:55 PM4/4/14
to w...@dartlang.org
Yea I have the flag turned on. I also try and issue a warning on the site showing it off where it yells at you if you aren't in Chrome with experimental web platform features turned on.

Just curious but is there a good way to detect if the polyfill is being used? I currently do it in JS but would prefer Dart if possible.


--
You received this message because you are subscribed to the Google Groups "Dart Web Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web+uns...@dartlang.org.
Visit this group at http://groups.google.com/a/dartlang.org/group/web/.

Don Olmstead

unread,
Apr 4, 2014, 5:49:36 PM4/4/14
to w...@dartlang.org
Here's the script I'm using currently https://github.com/donny-dont/Pixelate/blob/master/web/feature.check.js

I have to sneak it ahead of all the other JS files for it to work right when doing the compile.

Don Olmstead

unread,
Apr 4, 2014, 7:32:02 PM4/4/14
to w...@dartlang.org
Hey John is there a bug to follow for the not needing the experimental web platform features?

Siggi Cherem

unread,
Apr 4, 2014, 9:09:58 PM4/4/14
to w...@dartlang.org
Thanks everyone for trying it out and for your feedback!


Reply all
Reply to author
Forward
0 new messages