Is there a programatic way to bump the Elixir version of a Mix project?

Yep! That is what I do for other languages (like Golang). The “version bump” script updates the version of the project (the one in go.mod, the mix.exs homonymous for Golang projects) and the one in .tool-versions

The version in mix.exs is just there to show a warning when the project (mostly when used as a dependency) is used with an esrlier elixir version than needed.

What elixir version is used to compile/run a project depends completely on which binary is in context where the project is compiled/run. It‘s not defined by the mix project.

1 Like

Depends where the apps are. On dev machines .tool-version + using mise should be enough, on servers it depends but in our case we just use official Elixir HexPm Docker images where the version is explicitly spelled out.

Yeah, but we can still potentially provide tools for idiomatic tooling. Like a task that can update both a dockerfile and a .tool-versions file etc.

Thanks for all the contributions! Is it safe to say, then, that there isn’t a programmatic way to bump the “minimum version” required for an Elixir project.

While there is no mix task to do that, you can combine a syntax-aware tool to parse the version and then use a CLI tool to increase the version. It’s very doable.

1 Like

Agreed, let me mark your comment as a better answer :slight_smile: