Dialyzer cannot recognize types from dependencies


I have an umbrella app where I use a dependecy called ETS. This dependency has a type called set_options that I use in some of my specs.


The code works fine, but dialyzer is complaining. Namely:

Unknown type: ETS.set_options/0.
Unknown type: ETS.t/0.

Which then cause a ton of cascading errors.

To try and fix this, I added the following to my root mix.exs file (the one from the umbrella app, not the one from the child app):

  def project,
    do: [
      apps_path: "apps",
      version: "2.1.7",
      start_permanent: Mix.env() == :prod,
      deps: deps(),
      dialyzer: [
        plt_add_deps: :app_direct,
        plt_add_apps: [
        plt_core_path: "plts",
        plt_local_path: "plts"

And then run:

  • mix dialyzer --plt
  • mix dialyzer

This did not work and the output was the same.

I then tried adding this to the mix.exs of the child app in question (alongside the previous changes):

  def application do
      mod: {WebInterface.Application, []},
      extra_applications: [:logger, :ets]

Unfortunately, nothing worked and I still get the same dialyzer errors.


How can I fix dialyzer so it recognized types from my dependencies?

Both of these appear to be defined in ETS.KeyValueSet rather than the top-level ETS module: