Updating a project from Phoenix/Elixir 1.1.3/1.2 to 1.4/1.8

I’m soon to be tasked with updating quite an extensive API project from Phoenix 1.1.3 / Elixir 1.2 to be up to date with current versions.

I’m still quite new to working in Phoenix and although it isn’t a huge leap in version numbers my cursory reading suggests it is going to be quite the task - Ecto in particular.

I thought I’d post and see if anyone could provide any advice or tips on potential ‘gotchass’ that I should keep an eye out for as I start the updating process.

As with all major updates I would say:

  1. Watch out for deprecated functionalities
  2. Watch out for API changes

Since you are not bumping any major version everything should still be backwards compatible though, so at least you have that.

The other thing I would have to tell you, is that if you are using asdf to run elixir and erlang, then from version 1.7 upwards (iirc) you need to specific the elixir, erlang and otp versions together in your .tool-versions file:

elixir 1.7.4-otp-21
erlang 21.0

You do not need to do so, the reason why you do this is that “default” precompiled version of Elixir is compiled against the oldest supported OTP version which is OTP 19 for 1.7 and OTP 20 for 1.8. This mean that you will not have access to some “new” features if you will use version compiled for older OTP.


Another suggestion is to update Elixir first. That’s because more recent versions of Phoenix may require more recent Elixir versions, so you are forced to update Elixir first anyway.

My suggestion would be:

  1. Update Elixir to v1.5 or v1.6
  2. Update Phoenix and important dependencies to latest
  3. Bump Elixir to v1.8

The reason why I would update Elixir in steps is because otherwise you may get too many warnings. Also, Elixir v1.7 broke some packages that were relying on private APIs, so doing at least one version before that, then updating dependencies, and then going to latest may avoid hitting those accidental breakages.


I’ve build a small helper site, which queries a small text file hex’s bob does provide since end of last year, which should make it easier to actually choose the correct version to install: https://bobs-list.kobrakai.de/

1 Like

Thanks for the great feedback everyone, it’s been super helpful.

If anyone needs me, I’ll be buried under a thousand deprecation warnings :smiley:

1 Like