Modifies mix doctor.explain so that it will work in umbrella apps.
As with mix doctor, this starts up an accumulator agent for umbrella apps and collects the results from each application in the umbrella.
If the module is not found in any of the apps, the standard "Could not find module" exception is raised.
If the module is found in one or more of the apps, then tne final result is true if it was true in each of the apps where it was found and false otherwise.
It seems very unlikely that the same module would be found in multiple apps, but this implementation supports that in case it happens.
To make this work more cleanly, CLI.generate_single_module_report returns :not_found if the module wasn't found rather than immediately raising an exception. This allows the doctor.explain task to capture the result and raise the exception later, if necessary.
Resolves #26
Modifies
mix doctor.explain
so that it will work in umbrella apps.As with
mix doctor
, this starts up an accumulator agent for umbrella apps and collects the results from each application in the umbrella.If the module is not found in any of the apps, the standard "Could not find module" exception is raised.
If the module is found in one or more of the apps, then tne final result is
true
if it wastrue
in each of the apps where it was found andfalse
otherwise.It seems very unlikely that the same module would be found in multiple apps, but this implementation supports that in case it happens.
To make this work more cleanly,
CLI.generate_single_module_report
returns:not_found
if the module wasn't found rather than immediately raising an exception. This allows thedoctor.explain
task to capture the result and raise the exception later, if necessary.