joshua.aug

joshua.aug

How to update .tool-versions?

I have a .tool-versions with this:

erlang 25.2.3
elixir 1.14.3-otp-25

How do I update it and should I?

Most Liked

Awea

Awea

Hey, this file is only used by external tool like (like ASDF) to manage your languages versions (here Erlang and Elixir).
You can simply edit the versions or use asdf local elixir x.y.z :ok_hand:

thiagomajesk

thiagomajesk

It depends on whether you want to change the versions of the tools you are using or not… You can change it manually by editing the file or running something like asdf local elixir latest. It’s essentially the same, but if you change the files manually, beware of typos since you can introduce a non-existing version that will prevent you from setting up your environment with asdf install later.

code-shoily

code-shoily

I manually update the file and then run asdf install.

arcanemachine

arcanemachine

I think if you edit the .tool-versions file manually, you’ll need to run asdf install elixir [new-version] afterward (where [new-version] is the version you changed the file to use).

I finally ran into this issue recently, and there wasn’t a lot of material on the subject that I could find:

I guess the good news is more or less that the process is pretty straightforward. Just bump and install the new Erlang + Elixir versions, run the tests, and fix any issues that come up. The compiler should show warnings for any new deprecations.

Don’t forget to bump the dependencies in your mix.exs file as well:

mix hex.outdated

https://hexdocs.pm/hex/Mix.Tasks.Hex.Outdated.html

mix deps.update --all

https://hexdocs.pm/mix/Mix.Tasks.Deps.Update.html

And if you ended up adding any dependencies at some point that are no longer needed, then you can remove those as well:

Hermanverschooten

Hermanverschooten

And the file .tool-versions is also compatible with mise, a more recent tool to manage your tools.

Where Next?

Popular in Questions Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
New
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
gonzofish
I’m currently trying to understand how to join three tables using Ecto. All the examples I’ve seen use 2, so maybe I’m just missing somet...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
sergio
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement