There are definitely outside-of-Mix ways to meet these needs, for example:

def project do
  [deps: build_deps]
end

defp deps do
  [foo: "~> 1.1.0"]
end

defp build_deps do
  if user = System.get_env("MIX_USER") do
    Keyword.merge deps, apply(User.Deps, user, [])
  else
    deps
  end
end

defmodule User.Deps do
  def keele do
    [foo: [path: "/home/keele/projects/foo"]]
  end
  def john do
    [foo: [github: "wishdev/foo"]]
  end
end

But every way I can think of pollutes your mix.exs, git history, and 
environment with what is strictly local, your-development-machine-only 
configuration. Building a little something in to Mix to help do this keep 
everyone's builds working and configuration clean. But I agree many other 
forms of dependency business logic, like Mix.env driven ones, can and 
should be right alongside everything else in your mix.exs so you know 
what's going on and can stay as flexible as possible.

-- 
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/d530618f-0c91-462b-9b6c-1d824b55360a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to