Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix clean hooks when override are presents
The issue appears to be that because the 'clean' operation might be run while dependencies have not yet been compiled, we applied a partial app detection mechanism with `rebar_app_disover:find_apps(..., ..., all, ...)`, which worked to parse "invalid" (unbuilt) apps, but also did not apply overrides. Instead, we trust the `install_deps` provider dependency by reusing the apps as they were fully parsed _if_ they were valid, and falling back to the `rebar_app_discover:find_apps/4` call only to cover the unreadable ones. This, it turns out, has the side effect of properly applying hooks when apps are fully parsed, and fixes #2862 Note that we can only clean paths safely if the discovery steps for the apps is done with the right profile and options, which may also impact configurations and hooks. So rather than duplicating that, we invoke the 'as' provider. This also opens the door on choosing a different provider (such as 'app_discover' only) down the road if the -a option isn't given.
- Loading branch information