Auto-install and auto-compile mix deps when doing mix run

76 views
Skip to first unread message

Gabriel Jaldon

unread,
Jun 22, 2015, 12:09:34 PM6/22/15
to elixir-l...@googlegroups.com
I think it would improve user experience when doing `mix run something` or `mix phoenix.server` auto-installs deps. Having to manually type in `mix do deps.get, deps.compile` seems like an unnecessary step. If people prefer that, they can still do it though.

Can we add this to Mix?

José Valim

unread,
Jun 22, 2015, 12:21:14 PM6/22/15
to elixir-l...@googlegroups.com
You never need to type mix deps.compile manually unless doing something really special (like changing a dependency source manually).

The reason why we decided to not auto-install deps is because it is an expensive step to run "behind the scenes".



José Valim
Skype: jv.ptec
Founder and Director of R&D

On Mon, Jun 22, 2015 at 6:09 PM, Gabriel Jaldon <gjal...@gmail.com> wrote:
I think it would improve user experience when doing `mix run something` or `mix phoenix.server` auto-installs deps. Having to manually type in `mix do deps.get, deps.compile` seems like an unnecessary step. If people prefer that, they can still do it though.

Can we add this to Mix?

--
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/d2deab6b-046a-4931-8552-952a33e330b2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gabriel Jaldon

unread,
Jun 22, 2015, 1:21:58 PM6/22/15
to elixir-l...@googlegroups.com
It is an expensive but we don't really do it behind the scenes when we auto-install. A user will still see it happening when they do mix run or some other task.

That way, we're also consistent since we already auto-compile deps when we run? 

José Valim

unread,
Jun 22, 2015, 2:23:36 PM6/22/15
to elixir-l...@googlegroups.com
It is not about consistency because they are two completely different things. We are comparing downloading packages and remote git repos with running code locally.

If I am bringing remote code to my machine, I want to be explicit about it for all purposes, performance, security, etc.
--
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-co...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Gabriel Jaldon

unread,
Jun 22, 2015, 2:27:01 PM6/22/15
to elixir-l...@googlegroups.com
I see what you mean now. Thanks for taking the time to explain. :)

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/2UPtWkek5hM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4JC7UHbWi2dvZ%3DghF9ZGv_BNVKmpXZ0SXDShxytU4oOfw%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Gabe Jaldon

Ben Wilson

unread,
Jun 22, 2015, 2:28:49 PM6/22/15
to elixir-l...@googlegroups.com, jose....@plataformatec.com.br
It's also worth noting that this is the convention in every other build system I can think of.

bundle install
npm install
cargo install
go get
etc.

The mix deps.compile step IS done automatically as Jose mentioned, but it would be very unusual for dependency retrieval to happen implicitly.

On Monday, June 22, 2015 at 2:23:36 PM UTC-4, José Valim wrote:
It is not about consistency because they are two completely different things. We are comparing downloading packages and remote git repos with running code locally.

If I am bringing remote code to my machine, I want to be explicit about it for all purposes, performance, security, etc.

On Monday, June 22, 2015, Gabriel Jaldon <gjal...@gmail.com> wrote:
It is an expensive but we don't really do it behind the scenes when we auto-install. A user will still see it happening when they do mix run or some other task.

That way, we're also consistent since we already auto-compile deps when we run? 

On Tuesday, June 23, 2015 at 12:09:34 AM UTC+8, Gabriel Jaldon wrote:
I think it would improve user experience when doing `mix run something` or `mix phoenix.server` auto-installs deps. Having to manually type in `mix do deps.get, deps.compile` seems like an unnecessary step. If people prefer that, they can still do it though.

Can we add this to Mix?

--
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+unsubscribe@googlegroups.com.

Gabriel Jaldon

unread,
Jun 22, 2015, 3:03:04 PM6/22/15
to elixir-l...@googlegroups.com
This isn't the case with Bundler. I actually implemented auto-installing on bundler when running certain commands in bundler which includes `bundle exec`. 

So was thinking maybe we could do the same with `mix run`.

On Tue, Jun 23, 2015 at 2:28 AM, Ben Wilson <benwil...@gmail.com> wrote:
It's also worth noting that this is the convention in every other build system I can think of.

bundle install
npm install
cargo install
go get
etc.

The mix deps.compile step IS done automatically as Jose mentioned, but it would be very unusual for dependency retrieval to happen implicitly.

On Monday, June 22, 2015 at 2:23:36 PM UTC-4, José Valim wrote:
It is not about consistency because they are two completely different things. We are comparing downloading packages and remote git repos with running code locally.

If I am bringing remote code to my machine, I want to be explicit about it for all purposes, performance, security, etc.

On Monday, June 22, 2015, Gabriel Jaldon <gjal...@gmail.com> wrote:
It is an expensive but we don't really do it behind the scenes when we auto-install. A user will still see it happening when they do mix run or some other task.

That way, we're also consistent since we already auto-compile deps when we run? 

On Tuesday, June 23, 2015 at 12:09:34 AM UTC+8, Gabriel Jaldon wrote:
I think it would improve user experience when doing `mix run something` or `mix phoenix.server` auto-installs deps. Having to manually type in `mix do deps.get, deps.compile` seems like an unnecessary step. If people prefer that, they can still do it though.

Can we add this to Mix?

--
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-co...@googlegroups.com.


--


José Valim
Skype: jv.ptec
Founder and Director of R&D

--
You received this message because you are subscribed to a topic in the Google Groups "elixir-lang-core" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elixir-lang-core/2UPtWkek5hM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elixir-lang-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/7b62bc6f-ff14-47a7-b184-95ba110e8fff%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Gabe Jaldon

Reply all
Reply to author
Forward
0 new messages