How can update "mix.exs" in elixir?

There seems to be some prior art here: Mix deps.add functionality - #5 by chvanikoff – But it’s old and probably requires some massaging to work with the latest Elixir.

Here’s a long recent-ish discussion on the matter: Why doesn't the Elixir core team accept `mix deps.add` proposals?

It boils down to the fact that mix.exs is executable Elixir code. So whatever you can do in Elixir, you can do in that file. That means that the deps can be in any format and modifying the file can be a big challenge. A tool could be made to handle the 90% case, and personally I would think that’s worthwhile, but others disagree (or at least disagree that such a tool should be part of Elixir). Other than the first link in my post, I don’t know of such a tool existing.

It’s a workflow that people expect from the likes of npm install, that when they run an install/update command, their versions are automatically saved to the configuration file.

2 Likes