Skip to content

Commit

Permalink
Fix clean hooks mechanism
Browse files Browse the repository at this point in the history
As mentioned in erlang/rebar3#2863, fixing the `clean` hooks appears to have fixed their count by properly assigning them in the top-level app in a non-umbrella project. See how [the multi app file](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/multi_app_hooks/multi_app_hooks.test#L5) has a single `CLEAN!` hook but [the single app one had two for clean](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/single_app_hooks/single_app_hooks.test#L5-L6) while [having a single one for compile](https://github.com/tsloughter/rebar3_tests/blob/cba67afa851747bcdb5294c9d88c697f0d814b3c/single_app_hooks/single_app_hooks.test#L14).

This is because the discovery step we weren't doing right before the PR meant that the hook was assigned both to the project and the individual app. By fixing the detection and overrides, the hook is properly assigned to the app in a single-app project, and to the project root when in an umbrella.

This PR prepares tests to pass once the rebar3 one is merged.
  • Loading branch information
ferd authored Feb 20, 2024
1 parent cba67af commit f387b89
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions single_app_hooks/single_app_hooks.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ TERM=dumb rebar3 clean
===> Verifying dependencies...
===> Cleaning out single_app_hooks...
CLEAN!
CLEAN!
>>>= 0

TERM=dumb rebar3 compile
Expand All @@ -12,4 +11,4 @@ TERM=dumb rebar3 compile
===> Analyzing applications...
===> Compiling single_app_hooks
COMPILE!
>>>= 0
>>>= 0

0 comments on commit f387b89

Please sign in to comment.