Hiya I'm unsure about this proposal. I do think that the name OTP applications is unclear. There are other Erlang OTP applications that are started when not in this list, and the skipped and included applications are OTP applications as well.
How does one determine if a production dependency is an application or not? Cheers, Louis On 20 September 2016 at 10:01, José Valim <jose.va...@plataformatec.com.br> wrote: > One of the most confusing topics when it comes to building Mix projects and > releases is in figuring out the list of applications. The workflow for > adding a dependency usually requires adding the dependency to the list of > deps and then adding its application to the list of applications. > > Since this was a common source of confusion, we wrote a blog post discussing > the common scenarios and rationale: > http://blog.plataformatec.com.br/2016/07/understanding-deps-and-applications-in-your-mixfile/ > > However, I believe we should still attempt to simplify this workflow. This > is such a proposal. > > The idea is to automatically inflect the list of applications by including > all dependencies that are required in production. Overall, we will have: > > def application do > > [otp_applications: [:logger], > > skipped_applications: [...], > > included_applications: [...]] > > end > > > If the :applications key is is not provided, we will automatically inflect > it by calculating: > > applications = ((all_apps_for_prod_deps ++ otp_applications) -- > included_applications) -- skipped_applications > > otp_applications - lists applications that come from erlang or elixir > skipped_applications - dependencies that are listed in production but you > want to skip during releases (mutually exclusive with :applications) > included_applications - same meaning as today. applications you want to > include in production but not start them > > > I expect for the majority of cases developers won't need to pass the > skipped_applications and included_applications flags, so we can skip them in > generated templates. At the end, new apps will have only the following: > > > def application do > # List only applications from Elixir and Erlang required in prod > > [otp_applications: [:logger]] > > end > > > Thoughts? > > José Valim > www.plataformatec.com.br > Skype: jv.ptec > Founder and Director of R&D > > -- > 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 elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4LWOsR5xiND%3D-Ty_NcFmFj3VfPstVs1mxTiTsbrf6g64Q%40mail.gmail.com. > 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 elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM-pwt6UgfnztEvSspErorQo3y337ZEjQ5Hho-FEWpxoJWFtnw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.