Closed kipcole9 closed 10 months ago
@kipcole9 Thanks for the well-researched report, and thanks for your work on cldr
& money
. Will take a look.
Does anyone know if there's a workaround for this at the moment?
Does anyone know if there's a workaround for this at the moment?
Not sure if this helps but linking from the original discussion: https://elixirforum.com/t/elixir-v1-15-0-rc-0-released/56019/28 the suggestion made by Jose:
When they traverse dependencies, they need to include the parent’s optional applications and not log an error if the dependency you cannot load is optional. But, from looking at the code, the warning causes no harm either.
Hi! After upgrade a project with Elixir 1.15.0-otp-26
with Erlang 26.0.1
, and after fix the problem with dialyzer (I had to include prune_code_paths: false
in mix.exs
), I got similar errors, dialyzer works, but I'm worried about all of this warnings:
Thank you very much @jeremyjh - and for maintaining such an important library. Really appreciated. Even if it still does my head in from time to time!
Published to hex in 1.14
Environment
Elixir & Erlang/OTP versions (elixir --version): Elixir 1.15.0-rc.0, OTP 26.0
Which version of Dialyxir are you using? (cat mix.lock | grep dialyxir): 1.3.0
Current behavior
Dialyxir is issuing warnings that it can't load applications that are transitive optional dependencies. An example using the ex_cldr lib:
The libs
:castore
and:certifi
are optional dependencies of cldr_utils.cldr_utils
is a required dependency ofex_cldr
.The warning messages are unique to Elixir 1.15 / OTP 26.
I don’t see this output for any other combinations I’ve tried:
Per this comment it seems reasonable that the addition of an
optional_dependencies
config key to.app
files in OTP 24 and now the building of that config key in Elixir 1.15 may be part of the issue. The relevant code in dialyxir seems to be: https://github.com/jeremyjh/dialyxir/blob/e9556460bc130287dd6687ab02041634ac827913/lib/dialyxir/project.ex#L383Expected behavior
No warnings are issues when attempting to load transitive optional dependencies.