I just open sourced a Docker based CLI tool to help diff 2 projects generated with any 2 versions of Phoenix

Let’s say you’re working on a project for a few months and you’re ready to upgrade Phoenix versions.

I don’t know about you but besides reading the changelog and upgrade guides, I’m also very interested in updating any files that were changed when you generate a new project with phx.new. This way my existing project’s Phoenix generated files can be set up and configured the same as what they would be in a fresh phx.new project of that latest version.

This tool lets you run verdiff --framework phoenix 1.4.4 1.4.8 to get a diff of both projects so you can quickly make any necessary changes in your project. You can use any 2 versions you want as long as they are on Hex.

It uses Docker under the hood to create an image, create both projects, diff them and then it cleans up everything after it finishes leaving your dev box untarnished and as good as new.

You can check it out at: https://github.com/nickjj/verdiff


Readers may also find https://www.phoenixdiff.org interesting, although this tool appears to be much more agnostic about the projects it can compare - it’s not limited to just Phoenix!


Thanks, I didn’t know about that site.

One potential advantage of my tool is you can also run it with a --save flag to copy the projects out of Docker and onto your dev box. This allows you to diff projects in your editor, but more importantly also end up with a brand new project generated which is handy if you don’t keep Elixir installed on your dev box, which I don’t since everything runs in Docker. So it doubles as a tool to create new projects too (the README explains how you can customize the project name that gets generated).

Also yes, it works with Rails, Django and Laravel. Not too useful in a world where Phoenix rules supreme, but I needed that functionality for client projects I work on so I added it. With the way the tool is set up, adding those frameworks was like 7 lines of code each.

1 Like