My company, Amignosis, website is a simple Phoenix LiveView web app. It was on Phoenix 1.7.21 and Elixir 1.18, and I wanted to upgrade it to Phoenix 1.8.3 and Elixir 1.19. So, I decided to try Tidewave with Claude Code, to do it for me.
Here’s a video showing the process, but read ahead if you want to get the gist of it.
I asked Claude Code to read the Phoenix CHANGELOGs online. Then I told it that I would feed it the diffs between 1.7.21 and 1.8.3 one by one.
The diffs came from phoenixdiff.org, a very handy site that shows you what’s changed between Phoenix versions. It basically compares what would be generated by mix phx.new, if you were to do it by hand.
The problem with that site is the presentation of the diffs. Because of this, Claude Code can’t read the content. I cloned the repository of that project. I enhanced it so that I can copy each diff to the clipboard.
As I mentioned above, my first strategy was to feed it each diff one by one. During the process, I realized a better strategy. First, save all the diffs locally. Then, point Claude Code to them. This way, it can have the whole picture.
What worked well is that Claude Code (via Tidewave) applied the diffs. It also tweaked them when needed to reference my specific project’s domain names.
Hiccups
The process worked quite well. I had a few hiccups though.
Tidewave got stuck in a loop due to a huge prompt
The first one was that at some point, one of the diffs was huge. I pasted it in the Tidewave chat prompt and hit enter. A message appeared saying the prompt was too big and couldn’t work. At that point, Tidewave got stuck in a loop. Anything I typed, no matter how small, I was getting the same error message. I couldn’t find a way to get it out of that state. Starting a new session meant losing the context, but that’s what I did anyway. It had the context of the pending applied diffs locally, and I described what we were working towards from scratch. It seemed it continued without any issues.
Next time, I will avoid pasting big text. Instead, I will point it to a local file with that content. This way, it can just apply it directly.
Claude Code decided to skip daisyUI
A big change in Phoenix from 1.7.x to 1.8.x was the introduction of the daisyUI library. It’s not mandatory to use it, but some of the default files generated assume you are using it anyway.
Because I was feeding the diffs one by one, Claude Code didn’t have the whole context. So it decided to skip DaisyUI altogether.
At some point, I asked it to embrace the introduction of daisyUI. We would handle any styling changes it would cause later. My app is very small (just two pages) so it wouldn’t be that hard.
After some back and forth, we ended up with a running version. It had the same look and feel as my earlier version.
Tidewave couldn’t refresh its shell context
This wasn’t a huge deal, but still created a tiny friction. At some point, as Claude Code was applying the diffs, we started seeing some warnings. Those warnings were because the project was running with Elixir 1.18. Yet, Phoenix >= 1.8 expects Elixir 1.19.
I am using asdf to manage Elixir/OTP versions. As a result, my current Tidewave session couldn’t refresh its terminal context to that version. That’s despite us switching asdf to the new versions locally. After some back and forth, we managed to snap out of the stuck situation. I don’t remember if I actually just started a new chat in Tidewave or not.
Conclusion
I think next time I can help Claude Code finish this faster. Two strategies should help here:
- Don’t leave a project on an older version for too long
- Feed Claude Code *all* the diffs at once instead of one by one
Here’s what I am doing
At Workbrew, I help our customers succeed, while working on docs, fixing bugs, and developing internal tools. At Amignosis, I pour my heart and skill into crafting slowly brewed software, one thoughtful line at a time. I am craftsman in a world of complexity and low-quality solutions. I am a shoemaker. I take the time to create simple, timeless software built to last. Check what I am doing now and talk to me.
Leave a Reply