I recently made a project with cowboy as a dependency and I used cowboy_req:req/0 type in my own specs. When I run dialyzer on the project I get the following errors:
_build/default/lib/cowboy/src/cowboy_req.erl
Line 134 Column 9: Unknown type ranch:ref/0
Line 152 Column 18: Unknown type ranch_proxy_header:proxy_info/0
Both types exist and are exported from ranch module.
Problem disappears when I add ranch in my .app file, but shouldn’t dialyzer handle that as ranch is the dependency of cowboy? Is that expected behavior or is it a bug?
I’m using cowboy 2.12.0 and rebar3 3.23.0 on OTP 27.0.0