I believe we can warn if a dependency is not listed in the applications
list or explicitly marked with runtime: false. We already know how to
compute this information so it is a matter of guaranteeing everything is
sync. Please open up an issue or send a PR. If the code is
straight-forward, then I see no reason for not doing this.

Unfortunately we cannot deprecate :applications because fixing the warning
implies your package will only run on Elixir v1.4+. Maybe we can do it in
the future, for v1.7 or v1.8, but now it is definitely too early.




*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Director of R&D

On Sat, Feb 11, 2017 at 3:21 PM, Saša Jurić <[email protected]> wrote:

> This is a proposal to introduce mix warning (or error) if a dependency is
> not listed in the applications list, or explicitly marked with runtime:
> false.
>
> I saw this case yesterday, as one user of my lib was puzzled by a failure
> when starting their app. The root cause of the failure was that they didn't
> include my lib in the applications list. However, the error message was not
> quite revealing for them. In particular, the error message clearly
> indicated that some process is not running. While that's quite useful info
> for lib authors, it's not as helpful for lib users, and it doesn't really
> points to the root cause of the problem.
>
> Since `runtime: false` is now the official thing, mix could require that a
> dep is either included in app list or explicitly marked as compile-time
> only, which would then provide a more instructive error message.
>
> Perhaps a better solution would be to deprecate the applications setting,
> in which case the proposed verification wouldn't be needed. TBH, I actually
> think that the applications key makes it quite easy to get things wrong, so
> maybe such deprecation is worth considering.
>
> --
> You received this message because you are subscribed to the Google Groups
> "elixir-lang-core" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/elixir-lang-core/99c7767e-0b7c-4dfc-b643-
> db5d9c19d371%40googlegroups.com
> <https://groups.google.com/d/msgid/elixir-lang-core/99c7767e-0b7c-4dfc-b643-db5d9c19d371%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4%2BbYxm9570qchoRSJGXxJgJNWN%2B0inx6Q32DD6Hw5BxUg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to