Mix deps.update --all failure debugging

So I have this elixir application which depends on a bunch of other erlang applications, most of which we’ve written ourselves. Now I don’t full understand how am I supposed to debug when a deps.update --all fails. Could someone point me in the right direction?

Failure I get after running mix deps.update --all:

(Protocol.UndefinedError) protocol String.Chars not implemented for {'nothing to repeat', 0}
   (elixir) lib/string/chars.ex:3: String.Chars.impl_for!/1
   (elixir) lib/string/chars.ex:22: String.Chars.to_string/1
   (mix) lib/mix/rebar.ex:183: Mix.Rebar.compile_req/1
   (mix) lib/mix/rebar.ex:143: Mix.Rebar.parse_dep/1
   (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
   (elixir) lib/enum.ex:1314: Enum."-map/2-lists^map/1-0-"/2
   (mix) lib/mix/dep/loader.ex:348: anonymous fn/3 in Mix.Dep.Loader.rebar_children/3
   (mix) lib/mix/rebar.ex:119: Mix.Rebar.recur/2

I understand what the error means and could also presumably fix it, however, I do not know which dep is the culprit it. I imagine its some erlang dependency in my app.

I have tried to upgrade rebar from a local copy (which I know works since I use it in the deps), since I thought that could be an issue.

Anywho, I would appreciate any help/advice or debugging tip here. Also, please let me know if I need to add more details here.


1 Like

Not an entirely satisfying answer, but perhaps grep -r "nothing to repeat" deps will tell you something?

Thanks @aseigo, I tried that, no luck unfortunately. None of my dependencies seem to have this ‘nothing to repeat’ string in them afaict.

Alright, I found it and man it is annoying as hell.

We had one erlang dependency, which in its rebar.config had another dependency specified like so:

{inet_ext, "*", {git, "https://github.com/helium/inet_ext", {branch, "adt/wsl-support"}}}

This breaks the Regex module in elixir, because there’s “nothing to repeat”. All I was missing was a dot before that *.

So the correct way to specify an erlang dependency so that mix can read it is:

{inet_ext, ".*", {git, "https://github.com/helium/inet_ext", {branch, "adt/wsl-support"}}}


I think helium removed the lib