How can I set the Erlang OTP version in a mix project?

I need to set the version for erlang otp I’m working with a library that doesn’t work under OTP 18

I mean in the mix file I can put the elixir version, I want to know if is there a way to put the erlang one there

The elixir version you are using has a specific erlang version requirement that it will only work with so by setting an elixir requirement you are implicitly setting an erlang requirement.

At this time there is no separate erlang version requirement in mix.exs.

1 Like

I was working with a library that works with OTP 19 but crashes with OTP 18 and trying to run the specs onn semaphore ci but he detects the elixir version 1.3.2 and he uses OTP 18 because this Elixir version supports it.

So you have to configure your CI manually to choose the correct OTP version. Travis uses kerl for managing OTP and kiex for managing Elixir versions, perhaps Semaphore does use something similar?

If your CI does not support some version manager or configuring your OTP version via any other way, you really should search contact and explain that as a bug!

It does make sense to test your code against at least the current elixir minor and the previous, and each with the minimal and next OTP version at least.

3 Likes