In case someone runs into the same problems I have run into:
- If you derive Protocols of external dependencies like
Jason.Encoder, forcompile.elixirto work, you need to first runmix compile.protocols - Unlike stated here Rewriting imports to aliases with compilation tracers - Dashbit Blog, it seems like you need to use
mix run import2alias.exs ...instead ofelixir import2alias.exs ...otherwise the will be no mix environment (af far as I understand) and you’ll get this error:** (exit) exited in: GenServer.call(Mix.ProjectStack, {:get_stack, #Function<10.68469381/1 in Mix.ProjectStack.peek/0>}, :infinity). At least that worked for me.






















