manuel-rubio

manuel-rubio

Updating my fork of Coherence for Phoenix 1.5 and 1.7

Well, I wanted to drop Coherence in one of the developments I’ve in production but it was hard to evolve that from Phoenix 1.4 to Phoenix 1.5, I can see there’s a topic from 2018:

I wasn’t aware of this, I did (like many others) modifications in my fork of coherence to adapt it to Phoenix 1.5, you can see it here:

So, as I said, days ago I had two options:

  1. Drop the whole development of Dymmer and start it from scratch, because it’s awful, it cannot get worse if I start it from scratch, right?
  2. Migrate step by step, dependency to dependency, and part at a time.

I’m not sure about your experiences, but mine are that migrations “all at once” don’t work. You can get a really good brand-new web app doing what you desire, but the old one is working and generating a bit of money, so do you want to jeopardize it?

So, I started migrating to Phoenix 1.7 and the first stop was phoenix_markdown, that library wasn’t updated for longer and the earmark changed a bit, you can see here the changes I made:

https://github.com/dymmer-code/phoenix_markdown

Second stop, recaptcha, looks like none was using that for longer, isn’t it? There’s another called HCaptcha that looks like the new kid on the block, well, finally, I made these changes:

https://github.com/dymmer-code/recaptcha

And last stop, at the moment, Coherence. Phoenix 1.7 has a new-brand way for auth and even getting solutions like Pow, Coherence was a thing some time ago, but it was abandoned. As I introduced, I made changes for Phoenix 1.5 helped by others who did the same, but looks like most of the people left Coherence and it hasn’t been supported for Phoenix 1.7… until now:

I did this branch for Phoenix 1.7 BUT not using LiveView at the moment, so don’t get too excited, it’s only a way to give me enough time to perform the next steps of the migration for the project.

Maybe I write a bit more about migrations in a future, I’ll let you know :slight_smile:

Most Liked

dimitarvp

dimitarvp

That’s obviously the most pertinent question here, agreed. So why did you start the migration at all? Why need to drop Coherence? :thinking:

With that out of the way, step-by-step migration sounds exhausting and long. But you already started it so maybe that time & energy investment is worth it for you.

Personally I’d start a brand new project and gradually copy all the secret (business) sauce to it. :person_shrugging:

manuel-rubio

manuel-rubio

Believe me, I tried a couple of times and I have a version of the project non-viable for Phoenix 1.6, and a very nice umbrella project using LiveView and Phoenix 1.7, but still, it’s not working yet. One of the problems isn’t regarding Phoenix or Elixir, one of the most challenging issues is the APIs (like PayPal API v2) but that’s for another different post :smiley:

Briefly, I got a version that’s compiling with Elixir 1.17 and using Phoenix 1.7 right now, in only two days working on that. After that, I’ll need to check if makes sense to make some changes like dropping Coherence finally and getting a brand-new phx.gen.auth… as you said, at the end of the day what matters is getting things done and not fancy.

Where Next?

Popular in Discussions Top

arcanemachine
https://nitter.net/josevalim/status/1744395345872683471 https://twitter.com/josevalim/status/1744395345872683471
New
Jayshua
I recently came across the javascript library htmx. It reminded me a lot of liveview so I thought the community here might be interested....
New
sashaafm
I’m trying to evaluate the best combo/stack for a BEAM Web app. Right now I’m exploring Yaws a bit, after having dealt with Phoenix for a...
New
cvkmohan
The upcoming Phoenix 1.6 release looks very interesting. Became a habit to watch the commits - and - what they are bringing in. phx.gen...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
WolfDan
After doing a port from a c++ library to my project in phoenix I’ve seen that I need a faster way to run this algorithm and I found this ...
New
fireproofsocks
I’ve been working on an Elixir project that has required a lot of scripting. I usually reach for Elixir because I like it more (and in th...
New
marciol
Please, let me know if this kind of discussion already took place in another topic . Hi all, how do you consider if is better to build ...
New
hazardfn
I suppose this question is effectively hackney vs. ibrowse but we are at a point in our project where we have to make a choice between th...
New
chulkilee
Here are the list of HTTP client libraries/wrappers, and some thoughts on HTTP client in general. I’d like to hear from others how they w...
New

Other popular topics Top

axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43806 214
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New

We're in Beta

About us Mission Statement