[Proposal] Make mix aware of how to run tests for rebar3 managed applications

18 views
Skip to first unread message

Devon Estes

unread,
Oct 24, 2019, 4:02:33 AM10/24/19
to elixir-lang-core
I was playing around with multi-language umbrella applications yesterday, it's great that mix knows how to compile applications managed by rebar3, I found myself wishing that I could similarly run my tests from the root of the umbrella with `mix test` in the same way. I thought about it a little bit, and I had two ideas:

1) mix knows to run both `rebar3 eunit` and `rebart3 ct` when it tries to run tests in a rebar3 managed application, or
2) mix runs `rebar3 test` and expects the user to configure their rebar3 applicaiton to have an alias called `test` that runs the tests for this project in whichever way they see fit.

I personally like option 1 better, but I can see a reason for option 2.

The biggest issue I see with option 1 is the handling of CLI flags and such, since `mix test`, `rebar3 eunit` and `rebar3 ct` all have a bunch of possible configuration that can be passed in as CLI options. I'm not totally sure how we'd want to handle that sort of thing, but it's the biggest area I can see this getting kind of difficult.

So, what do folks think?

José Valim

unread,
Oct 24, 2019, 4:05:32 AM10/24/19
to elixir-l...@googlegroups.com
I really don't think Elixir should absorb this complexity. It feels out of the scope of the language. But someone can make a "mix_rebar" integration package that provides said conveniences. If Mix has to expose some API to make it possible, we will be glad to discuss them.


José Valim
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-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/3cca069b-34c1-4050-b62c-ba8f294adf62%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages