Elixir: mix do clean, compile does not perform mix deps.compile

Created on 4 Aug 2016  路  10Comments  路  Source: elixir-lang/elixir

Environment

  • Elixir version (elixir -v):
    Erlang/OTP 19 [erts-8.0] [source] [64-bit] [async-threads:10] [kernel-poll:false]
    Elixir 1.3.2
  • Operating system:
    Ubuntu 16.04 LTS

    Current behavior

I have an umbrella application and one of those applications is a phoenix app. When I try:

mix do clean, compile

I get this error:

** (Mix) The task "compile.phoenix" could not be found. Did you mean "compile.elixir"?

Expected behavior

I would expect it to work. This works:

mix clean
mix compile

This works:

mix do clean
mix do compile

But this does not:

mix do clean, compile

Also, if it do a mix deps.compile before I mix do clean, compile then it works.

I putting this issue here because I'm trying to deploy an application with edeliver. There was a problem with boldpoker/edeliver#94 which led me to phoenixframework/phoenix#1766 which was addressed by a change to elixir. I don't have a reference for that change, but matching up comment dates, I found https://github.com/elixir-lang/elixir/commit/50c5729f77dbd80f08f95a0412e6ae39dc56de5c and https://github.com/elixir-lang/elixir/commit/90543e865a85f2300c08894c110f36154cfb1ebd

Mix Bug

Most helpful comment

Mix remembers what tasks it already ran, so it won't run loadpaths during compile if it already did during clean. Interestingly it also means mix do help, help for instance only prints the help once.

All 10 comments

Thank you @austinsmorris! Can you please provide a small github repo that reproduces the problem? It would help me reproduce the issue and work on a fix. :)

@josevalim,

You can pull down https://github.com/austinsmorris/compileapp, then:

mix deps.get
mix do clean, compile

Thanks!

I have the same problem, and it's triggered from inside the build process of Edeliver. So it's hard to work around.

Apparently the problem goes away when doing mix deps.compile before mix do clean, compile.

Mix remembers what tasks it already ran, so it won't run loadpaths during compile if it already did during clean. Interestingly it also means mix do help, help for instance only prints the help once.

Did this make it in the 1.3.3 release?

No, it was my bad. I forgot to check the milestone on github before doing the release. :(

Lost the whole afternoon until i finally found this issue 馃槶 @schnittchen I'm using your fix in edeliver in the meanwhile and it works great!

Thank you @austinsmorris! Your app helped a lot. I have fixed this in master.

I have decided to not backport it to the v1.3 branch because it affects reenabling tasks inside umbrella projects in general and I am concerned releasing the fix in a point release may break other developers workflow that may be relying on the bug accidentally. It will be included in v1.4 though (which will hopefully be released by dec/jan).

Thanks @josevalim! 1.4 should be ok. Work arounds already exist in edeliver for 1.3.x.

Was this page helpful?
0 / 5 - 0 ratings