ninenines / cowboy

Small, fast, modern HTTP server for Erlang/OTP.

Home Page:https://ninenines.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to use cowboy with ranch 2.1.0?

cgrothaus opened this issue · comments

Question

What must I do to use cowboy with ranch 2.1.0? And is this a good idea at all?

Background

On a standard phoenix 1.6 app, I recently ran mix hex.outdated --all, which featured a line

Dependency              Current  Latest  Status               
ranch                   1.8.0    2.1.0   Update not possible  

Running mix hex.outdated ranch shows that it is because of cowboy:

There is newer version of the dependency available 2.1.0 > 1.8.0!

Source  Requirement  Up-to-date  
cowboy  1.8.0        No          

So apparently the standard (transitive) dependencies of cowboy are holding back ranch at 1.8.0. How to resolve this?

Please ask in an Elixir related forum I don't know how to do that with mix. There's nothing stopping you from using Ranch 2.1 but Cowboy has to depend on 1.x until Cowboy reaches 3.0.