Chicken/egg problem with using Shoehorn for the first time
fhunleth opened this issue · 5 comments
We're getting this error on the first build. Second builds work fine.
== Compilation error in file lib/shoehorn.ex ==
** (CompileError) lib/shoehorn.ex:3: module Mix.Releases.Plugin is not loaded and could not be found
(elixir) expanding macro: Kernel.use/1
lib/shoehorn.ex:3: Shoehorn (module)
could not compile dependency :shoehorn, "mix compile" failed. You can recompile this dependency with "mix deps.compile shoehorn", update it with "mix deps.update shoehorn" or clean it with "mix deps.clean shoehorn"
Adding it here since I don't have a chance to debug it yet and wanted to track it in case anyone else was running into it.
I pull down shoehorn master and threw away _build
and deps
and rebuilt but did not get into the same place. Could you provide a minimal example on how you got to this point? its seems that distillery is being compiled out of order, but that doesn't seem like the standard behaviour.
I'll trim down the repo of ours that's doing this and see if I can post a minimal example of this specialness. I'm sure that it's a subtle mistake somewhere that will become obvious in the trimmed down version.
Here's a fairly minimal example: https://bitbucket.org/fhunleth/chickenegg/src/master/. I think these lines are to blame: https://bitbucket.org/fhunleth/chickenegg/src/9f5e7ebc8cca9078758f3675205b18c67a058af4/foo/mix.exs#lines-30:35
If I remember correctly, this turned out to be an issue because the mix project was overriding the compile
mix task in the aliases. The solution to this was to instead add a custom compiler. @fhunleth was this an acceptable solution?
Yes. Closing...