Cowboy on GitHub vs. Hex

It seems like the cowboy hosted on github by ninenines is NOT exactly the same as the hex package.

For example the hex package claims it is cowboy 1.0.4 but if I clone and checkout 1.0.4 from ninenines github I get compilation errors with erlang 19.0 - this is not the case with the hex 1.0.4.

Is there a fork of cowboy somewhere that relates to the hex package? Am I missing something?

Output from checking out and compiling cowboy 1.0.4:

src/cowboy_protocol.erl:272: undefined macro ‘INLINE_LOWERCASE/9’
src/cowboy_protocol.erl:397: undefined macro ‘INLINE_LOWERCASE/4’
src/cowboy_protocol.erl:257: function parse_hd_name/8 undefined
src/cowboy_protocol.erl:369: function parse_host/3 undefined
src/cowboy_protocol.erl:275: function parse_hd_name_ws/8 is unused
src/cowboy_protocol.erl:282: function wait_hd_before_value/8 is unused
src/cowboy_protocol.erl:295: function parse_hd_before_value/8 is unused
src/cowboy_protocol.erl:314: function wait_hd_value/9 is unused
src/cowboy_protocol.erl:329: function wait_hd_value_nl/9 is unused
src/cowboy_protocol.erl:343: function parse_hd_value/9 is unused
make: *** [ebin/cowboy.app] Error 1

Output from using hex cowboy 1.0.4:

==> cowboy (compile)
Compiled src/cowboy_middleware.erl
Compiled src/cowboy_sub_protocol.erl
Compiled src/cowboy_sup.erl
Compiled src/cowboy_websocket_handler.erl
Compiled src/cowboy_static.erl
Compiled src/cowboy_spdy.erl
Compiled src/cowboy_router.erl
Compiled src/cowboy_websocket.erl
Compiled src/cowboy_protocol.erl
Compiled src/cowboy_loop_handler.erl
Compiled src/cowboy_http_handler.erl
Compiled src/cowboy_rest.erl
Compiled src/cowboy_handler.erl
Compiled src/cowboy_clock.erl
Compiled src/cowboy_bstr.erl
Compiled src/cowboy_app.erl
Compiled src/cowboy.erl
Compiled src/cowboy_req.erl
Compiled src/cowboy_http.erl

I don’t get the compilation error above from cowboy when compiling by hand. It compiles nicely. Also, I just compared the files in “src” directory on the hex package with “src” on cowboy and they are identical to me. That is all on Linux and Erlang 19.0

1 Like

Is there anything you are doing differently to me? :frowning:

I am compiling on a Mac but that shouldn’t matter too much I suppose.

This seemed to be because my version of cowlib in deps was foobar’d for some reason… No idea how I managed that so this is a non-issue :stuck_out_tongue:.

Thanks for testing it out in any case :slight_smile:

EDIT: It was this issue that pointed me in the direction of cowlib - https://github.com/ninenines/cowboy/issues/842

1 Like

Glad I could be of assistance