OTP 24 and Elixir 1.13 compatibility
carrascoacd opened this issue · comments
Context
This library depends on cowboy ~> 2.7
which is using the deprecated :erlang.get_stacktrace/0
. It happens that when an unexpected error raises, we could end up with this situation:
Ranch protocol #PID<0.10445.0> of listener Wharever.Endpoint.HTTP (connection #PID<0.10444.0>, stream id 1) terminated
an exception was raised:
** (UndefinedFunctionError) function :erlang.get_stacktrace/0 is undefined or private
:erlang.get_stacktrace()
(cowboy 2.7.0) /builds/whatever/deps/cowboy/src/cowboy_stream_h.erl:314: :cowboy_stream_h.request_process/3
(stdlib 3.17.2) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
We are in front of an outdated dependency that prevents us from using Phoenix with OTP 24, for example.
Proposed solution
I think it's time to upgrade this library, so:
- Upgrade Elixir to ~ 1.13
- Make it compatible with OTP to 24
- Upgrade Cowboy to >= 2.8, as it stops using the old way.
Let me know if it makes sense and I'll submit a PR with the changes.
This library provides a minimum version. Which means you should be able to use it with more recent Elixir, OTP and Cowboy versions without any problems. So I don't believe any action is required, you simply need to run mix deps.update cowboy
in your app! Thank you.