Open mguimas opened 5 years ago
Interesting. So I've only ever run Dialyzer from the top level in an umbrella or in a non-umbrella'd app. Does the child application list Dialyzer as one of its dependencies in its mix.exs
?
Yes it lists. In the past I have run Dialyzer from child projects and it worked.
I'm assuming this isn't a public project. That would be too easy =). There have been SUBSTANTIAL bug fixes and improvements since 0.5.1
so can you try bumping to 1.0.0-rc4
?
Ok, I am going to try 1.0.0-rc4
. I'll come back here as soon as possible.
I upgraded to 1.0.0-rc.4
, and got the same error when running mix dialyzer
from the child project's directory.
Running mix dialyzer
at the umbrella root dir works, then running mix dialyzer
at the child project's directory works too.
So the problem is running mix dialyzer
from the child project when there is no PLT.
I totally buy that theory. Sounds like the regenerate PLT code just needs to be more robust to being run from child applications. Thanks for the report!
It looks like its a new issue on Elixir 1.8. It works for me on 1.7.3 but I get the same error on 1.8. This code is a garbage fire, it is shelling another process to build the PLT at the parent level because of load order issues for recursive app children. But I'm guessing something in the shell environment defaults has changed.
I audibly laughed in public when I read :wastebasket: :fire: haha. Was unexpected.
That code could definitely use some love, and I'm curious what changed upstream.
Environment
In both the umbrella and child projects I have:
In the single
mix.lock
file shared by all projects in the umbrella I have:Current behavior
It is also strange to get the message
** (Mix) The task "dialyzer" could not be found
after showing the help for thedialyzer
task.Expected behavior
The expected behavior is for the
mix dialyzer
command to build the PLT and run Dialyzer as expected.