How can this be solved? There are two decimal deps out there with identical names.
We have an erlang package that uses decimal (the old, erlang decimal package, that is called erlang_decimal in hex nowadays), but we also need another dependency that uses the elixir decimal package. In the deps section of the mix.exs file there are two deps with the same name here:
{:decimal, "~> 2.0"}, # the Elixir Decimal module
{:decimal, "~> 0.6.2", hex: :erlang_decimal} # the Erlang :decimal module
This is definitely not OK. If I rename the 2nd one to :erlang_decimal
, then the problem is that Mix looks for the .app
file of the erlang_decimal package as erlang_decimal.app
, which is actually decimal.app
, since the app name is still decimal. At this point I froked the erlang_decimal into a local git repo and renamed the application to erlang_decimal
properly, and then forced the top level app to load this forked version instead of the erlang_decimal hex package. This works with the .app files, but then another problem bumped up: a reference to an .hrl file in an erlang dependency that uses the old erlang decimal app:
-include_lib("decimal/include/decimal.hrl").
I could just fork this erlang app too, and change the path to "erlang_decimal/include/decimal.hrl"
, but at this point I believe this isn’t the right thing to do.
Do you have any suggestions how to get rid of this decimal problam?