How can I override "warnings as errors" for cowlib?

$ mix deps.compile cowlib
 GEN    clean-app
 ERLC   cow_cookie.erl cow_date.erl cow_http.erl cow_http_hd.erl cow_http_te.erl cow_mimetypes.erl cow_multipart.erl cow_qs.erl cow_spdy.erl cow_ws.erl
compile: warnings being treated as errors
src/cow_multipart.erl:427: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1
make[1]: *** [ebin/] Error 1
make: *** [all] Error 2
** (Mix) Could not compile dependency :cowlib, "make clean && make" command failed. You can recompile this dependency with "mix deps.compile cowlib", update it with "mix deps.update cowlib" or clean it with "mix deps.clean cowlib"

Does anyone know how to fix this aside from forking the library and changing its build scripts?

What is your Elixir version? I think Elixir v1.4 sets it as DEP=1 so it doesn’t enable warnings as errors (or something of sorts).

My version is 1.4.2

You can do the following:

  1. Check if it is possible to disable warnings as errors on and then pass compile: “…” when specifying your dependency

  2. See if there is a more recent cowlib version you can use