Elixir’s new version has a new compiler check specified here: link
After upgrading Elixir, now I receive a lot of these compiler warnings, some are related to my project dependencies and are easy to fix, but how do I fix the ones that are triggering because of a dependency of a library that is not mine?
I know that the obvious answer would be a PR (I already submitted some), but still, there is some libraries that are simply dead or very rarely maintained, meaning that even if I send a PR, there is no telling when this PR would be accepted, merged and a new version created.
So, is there any way to at least silence these warnings for a specific library dependency?
Also, how do you handle the case of optional dependencies?
For example, Tesla
library has the gun
library as an optional dependency: {:gun, "~> 1.3", optional: true},
.
Should the library dev still add :gun
to its :extra_applications
?
If I add :gun
to its :extra_applications
, it fix the issue, but only if I use :gun
dependency in my app, if I don’t use it, I was getting this error: ** (Mix) Could not start application gun: could not find application file: gun.app
Adding :gun
to my app (the one that depends on Tesla
) to :extra_applications
doesn’t seems to affect the warning, I still get it.
So, what is the correct way to handle these warnings?
I would also recommend an official blog post or some documentation on the matter so users not aware of it (specially new users) will not be bombarded by warnings and not know what to do.