Using Elixir dependencies in Erlang (umbrella) apps

Roger Lipscombe roger@REDACTED
Fri May 1 13:35:13 CEST 2020


On Fri, 1 May 2020 at 10:59, Marc Worrell <marc@REDACTED> wrote:
> Might also be an option to turn our Erlang umbrella app into an Elixir
> umbrella app, anybody having experience with that? The top level Erlang
> source code is next to nothing.

We've done this. You'll need a top-level mix.exs that looks something like this:

defmodule ErlangWithMix.MixProject do
  use Mix.Project

  def project do
    [
      apps_path: "apps",
      version: "0.1.0",
      deps: deps()
    ]
  end

  defp deps do
    [
      # Because of the only: [:test] here, "mix eunit" and "mix ct" aren't
      # available unless you _first_ "MIX_ENV=test mix compile", and
      # even then you need "MIX_ENV=test" every time.
      {:mix_eunit, git: "https://github.com/rlipscombe/mix_eunit",
runtime: false, only: [:test]},
      {:mix_ct, git: "https://github.com/rlipscombe/mix_ct", runtime:
false, only: [:test]},

      {:mix_relx, git: "https://github.com/rlipscombe/mix_relx", runtime: false}
    ]
  end
end

Then you'll need https://github.com/rlipscombe/mix_erl_new/


More information about the erlang-questions mailing list