anchor.diff:              C
       end.
   
  -reset_hooks(State) ->
  -    lists:foldl(fun(Key, StateAcc) ->
  -                        rebar_state:set(StateAcc, Key, [])
  -                end, State, [post_hooks, pre_hooks, provider_hooks]).
  +%% reset_hooks(Opts) ->
  +%%     lists:foldl(fun(Key, OptsAcc) ->
  +%%                         rebar_utils:set(OptsAcc, Key, [])
  +%%                 end, Opts, [post_hooks, pre_hooks, provider_hooks]).
   
   -spec all_app_dirs(list(file:name())) -> list(file:name()).
   all_app_dirs(LibDirs) ->
  
positive.code: 
  merge_deps(AppInfo, State) ->
      Default = rebar_state:default(State),
      CurrentProfiles = rebar_state:current_profiles(State),
      Name = rebar_app_info:name(AppInfo),
      C = project_app_config(AppInfo, State),
      %% We reset the opts here to default so no profiles are applied multiple times
      AppState = rebar_state:apply_overrides(
                   rebar_state:apply_profiles(
                     rebar_state:new(reset_hooks(rebar_state:opts(State, Default)), C,
                                    rebar_app_info:dir(AppInfo)), CurrentProfiles), Name),
      AppState1 = rebar_state:overrides(AppState, rebar_state:get(AppState, overrides, [])),
  
      rebar_utils:check_min_otp_version(rebar_state:get(AppState1, minimum_otp_vsn, undefined)),
      rebar_utils:check_blacklisted_otp_versions(rebar_state:get(AppState1, blacklisted_otp_vsns, [])),
  
      AppState2 = rebar_state:set(AppState1, artifacts, []),
      AppInfo2 = rebar_app_info:opts(AppInfo, rebar_state:opts(AppState2)),
  
      State1 = lists:foldl(fun(Profile, StateAcc) ->
                                   handle_profile(Profile, Name, AppState1, StateAcc)
                           end, State, lists:reverse(CurrentProfiles)),
  
      {AppInfo2, State1}.
  
  handle_profile(Profile, Name, AppState, State) ->
      TopParsedDeps = rebar_state:get(State, {parsed_deps, Profile}, {[], []}),
      TopLevelProfileDeps = rebar_state:get(State, {deps, Profile}, []),
      AppProfileDeps = rebar_state:get(AppState, {deps, Profile}, []),
      AppProfileDeps2 = rebar_utils:tup_dedup(rebar_utils:tup_sort(AppProfileDeps)),
      ProfileDeps2 = rebar_utils:tup_dedup(rebar_utils:tup_umerge(
                                             rebar_utils:tup_sort(TopLevelProfileDeps)
  
negative.code:                                  ParsedDeps = parse_profile_deps(Profile
                                                                  ,TopLevelApp
                                                                  ,ProfileDeps2
                                                                  ,rebar_state:opts(StateAcc1)
                                                                  ,StateAcc1),
                                   rebar_state:set(StateAcc1, {parsed_deps, Profile}, ParsedDeps)
                           end, State, lists:reverse(CurrentProfiles)),
  