Proper path to upgrade from 1.10 to 2.4 (latest)


#1

Hey folks,

I started on a massive project a little over a year ago and preferred to work on features rather than upgrading as I went, but now I’ve found the time to get it up to date. I know it will be a ton of work but I’m prepared, hehe. What do you guys recommend I do? I figure simply upgrading the version (I’m using EmberCLI) to 2.4 isn’t the best idea, so what would the best path be? 1.10 -> 1.13 -> 2.0 -> 2.4?

I appreciate any help!


#2

Definitely the incremental approach versus one giant leap.


#3

Any suggestions on which version increments to do?


#4

1.13 and iron out as much of the deprecation warnings then. After that, it’s rather painless.


#5

As already mentioned going version by version is the best way to tackle this. Try to fix the deprecations incrementally.

The only caveat I would say is that if you plan to get onto 2.4 right away you might be refactoring a lot of code anyway so it probably is useful to try a branch of your project using the latest and greatest. The issue is a lot of subtle things will be broken so you need to figure out how to divide and conquer the deprecations and missing API features your app currently might depend on.

I strongly recommend using the deprecation workflow add-on to manage the deprecations and isolate the specific issues. You can certainly try to do this all at once with a jump to 2.4 but you will be changing a lot of code all at once to get your app back to a stable state. But if you go the incremental step you will likely be refactoring things multiple times as you trace through how the API and best practices have evolved.

I did the upgrade incrementally, but if I were in your position today I would peek at what is broken by jumping straight to 2.4. The hardest part is that some things will just be broken because of removed and missing APIs in 2.x branch of ember. So identifying those can be confusing because you might not see deprecations just missing API features.

This addon will be a life saver though:

Also, carefully read through the deprecation guides this will give you a sense of what to do in your code in specific scenarios

Good luck. It is not as scary as it seems and it gives you an opportunity to refactor your code to newer cleaner patterns anyway. Especially if you have time to work through it methodically.


#6

Ember Watson can be useful too: https://github.com/abuiles/ember-watson


#7

Gentleman, thank you very much for the tips, I’ll use the plugins suggested and try upgrading directly, and if I get stuck too much I’ll just do it incrementally then (using branches in both cases ofc), worst case scenario I’ll learn a bit about design decisions made by the Ember team as the API evolved :slight_smile: