:mnesia warning when compiling
wandersondito opened this issue · comments
Wanderson Bragança commented
Hi! Thanks for the lib!
I'm getting this when compiling:
==> prometheus_ex
Compiling 19 files (.ex)
warning: :mnesia.system_info/1 defined in application :mnesia is used by the current application but the current application does not depend on :mnesia. To fix this, you must do one of:
1. If :mnesia is part of Erlang/Elixir, you must include it under :extra_applications inside "def application" in your mix.exs
2. If :mnesia is a dependency, make sure it is listed under "def deps" in your mix.exs
3. In case you don't want to add a requirement to :mnesia, you may optionally skip this warning by adding [xref: [exclude: [:mnesia]]] to your "def project" in mix.exs
lib/prometheus/contrib/mnesia.ex:22: Prometheus.Contrib.Mnesia.table_disk_size/2
Here are my versions:
Erlang/OTP 24 [erts-12.3.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit]
Mix 1.13.4 (compiled with Erlang/OTP 22)
To fix this you need to add the code below to the mix.exs
def application do
[
applications: [:logger, :prometheus],
extra_applications: [:mnesia]
]
end
I can open a PR if you don't mind.