Hi boris 👋🏼 there was an old discussion on the list about that
https://groups.google.com/forum/#!searchin/elixir-lang-core/mix$20add|sort:date/elixir-lang-core/ULBzKNCjYvY/XgwwrdepBgAJ the main thing that came was "The dependency file for mix is an Elixir program rather than just a simple JSON file. There's no way reliably and safely programatically modify the mix.exs file as a result." I don't think evaluation an exs to get a list will make a `mix.deps.add` reliable once we could put any elixir code on that file as well. Le ven. 10 mai 2019, à 06 h 09, 'boris kotov' via elixir-lang-core < [email protected]> a écrit : > Right now, its a bit annoying to lookup the version on hex, and then > manually adding it to the deps function. > > There was a discussion back in 2017 on this. > https://elixirforum.com/t/mix-deps-add-functionality/4856/7 > The main problem people have thought about was manipulation of mix.exs, > and true, we don't want that. > > Instead we can use a simple exs file for this, which should be evaluatable > to a list. So its a no-brainer to add items to it. For example `mix > deps.add jason`. > > defp deps, do: Code.eval_file("deps.exs") > > I am posting it here, to get some feedback on that feature, but I think > the integration could go into hex only and if its adopted, adding the > `deps.exs` file to the `mix new`-templates so please, share you opinions on > it. > > -- > 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/48f096ab-c6dd-494c-8907-ca16e1b785fe%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/48f096ab-c6dd-494c-8907-ca16e1b785fe%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Pedro Henrique de Souza Medeiros ---------------------------------- Cel: +1 (514) 641-5031 Email: [email protected] -- 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/CAJbPmJPgCLiSNYKQEzv-%3D_X7CcZnGQU4GWOV%3DS7Gh%3DLQcYFEuQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
