AbstractMachinesLab / mix_caramel

:candy: A Mix plugin to use Caramel
Apache License 2.0
16 stars 4 forks source link

Document that caramel_release is required or default to the newest release #3

Closed michallepicki closed 3 years ago

michallepicki commented 3 years ago

This is the output that I got before I figured out that there needs to be a caramel_release given in mix.exs project() options:

$ mix compile
** (ArgumentError) argument error
    :erlang.byte_size(nil)
    (mix_caramel 0.1.0) Mix.Tasks.Compile.Caramel.tarball_name/2
    (mix_caramel 0.1.0) lib/mix/tasks/compiler/caramel.ex:42: Mix.Tasks.Compile.Caramel.ensure_caramel_exists/1
    (mix_caramel 0.1.0) lib/mix/tasks/compiler/caramel.ex:56: Mix.Tasks.Compile.Caramel.run/1
    (mix 1.11.3) lib/mix/task.ex:394: Mix.Task.run_task/3
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:90: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:70: Mix.Tasks.Compile.All.compile/4
    (mix 1.11.3) lib/mix/tasks/compile.all.ex:57: Mix.Tasks.Compile.All.with_logger_app/2
michallepicki commented 3 years ago

I think having it optional and falling back to caramel installed system-wide is also a good choice, maybe I even like it the best. Only try to set up local caramel if version is provided, otherwise check if caramel is installed globally, if not then provide a readable error message to choose one of the two options.

leostera commented 3 years ago

This should be fixed now.