Rebar3 dialyzer requires plt_extra_apps, even though they're in deps

I added cowboy and bbmustache to my project in the deps section of rebar.config. And I’m getting errors like the following:

src/dashboard/dashboard.erl
Line 9 Column 16: Unknown function cowboy_router:compile/1
Line 21 Column 5: Unknown function cowboy:start_clear/3
Line 24 Column 5: Unknown function ranch:stop_listener/1

I can get the errors to go away if I add cowboy, ranch, bbmustache to plt_extra_apps.

But: surely I don’t need to do that? cowboy is in the top-level deps already.

Note: {plt_apps, all_deps} doesn’t fix this.

I think dialyzer uses applications listed from .app.src file, not in rebar.config deps. I’ve hit that problem few times where I forgot to list deps in app file.

1 Like