Ember 2.1 "batteries included"



Current Ember Release(s): 1.13.0, 2.0 beta (2015-06-12)
Current Discourse Ember version: 1.11.3

I was at an interesting talk in Chicago last night given by Erik Bryn, member of the core Ember team. He made it sound like the beta 2.0 released just last month was really meant to meet a self-imposed deadline they promised to their users and that version 2.1’s release will be where we start to see a number of significant changes. Among other things here were some key highlights from the talk about 2.1:

Version 2.1:

  • Angle bracket components: mustaches {{my-component}} will become angle brackets < my-component >
  • Ember CLI will have more prominence (inspired by ReactJS, future collaboration with AngularJS)
  • Will not support anything below IE9. Current version supports IE versions 7+

So in conjunction with these tid bits I wanted to bring a question to the Discourse team. Given that there is a new release of Ember every six weeks and the fact that Discourse is also updating at an extremely rapid rate, is it in the plans to keep 1.11.3 for a while until 2.x irons itself out? Or will you be updating incrementally toward 1.13 before you jump into 2.x? From reading other topics it was a mere 2 months ago Discourse moved to version 1.11 so even though I feel bad jumping the gun and “asking” – not intending to push – I feel it is relevant.

(Robin Ward) #2

I would very much like us to stay fairly close to the latest stable release of Ember but in practice it’s quite difficult as they have deprecated a lot of features, and our code base is quite large. We made excellent progress on the deprecates in 1.11 but there is still a lot of work to do :smile:

(Jeff Atwood) #3

Discourse 1.5 will probably pull in Ember 2.x.


It shouldn’t be too painful, right?

(Sam Saffron) #5

LOL :relaxed:

We expect the glimmer upgrade to be one of the hardest ones we had to date.

(Jeff Atwood) #6

And none of the Ember upgrades have been “easy”, either. But we try to update every so often so we pay the pain at regular intervals rather than all at once.

(Robin Ward) #7

Part of me wonders if it’ll be harder than removing ObjectController was. That was super hard but we split it over two updates.

The big deprecation in the next release is Ember.View - however there is a backwards compatibility library for that which is good for the next 5 releases. We do have about ~100 views that need to be fixed though.

Still, it’ll be a big upgrade. I imagine it’ll take me longer to get running (I believe 1.13 only took me 2-3 days), but I also imagine we’ll have fewer things mysteriously breaking like ObjectController did.


I realized this when I first heard about ember 2.1+ which is why I brought it up in July. I was hoping for a moon person to reveal an easy workaround I didn’t think of.

For you guys it’s hundreds of files in the project. For us, any override we have needs to be adjusted.

What are some other things Discourse users need to know?

(Robin Ward) #9

I’m not certain how I’ll handle the backwards compatibility and what we’ll have to remove until I get into the nitty gritty. We’re still finishing up :discourse: 1.4 so I’ll likely do this in 1.5.

So far I’ve been reasonably good at outputting deprecation notices when I break things plugins might be using. I hope I can keep that up so plugin authors have some time to update their code.

How I imagine it happening is: if you are using a view a warning will appear in the console until it’s removed. Obviously this will take some time with our 100+ files :smile:

(cpradio) #10

Your efforts have been greatly appreciated (even in the few plugins I’ve authored).