anchor.diff:      %% Get the list of plug-in modules from rebar.config. These
       %% modules may participate in preprocess and postprocess.
       {ok, PluginModules} = plugin_modules(Config1, PredirsAssoc),
  -
  -    {Config2, PluginPredirs} = acc_modules(PluginModules, preprocess,
  -                                           Config1, ModuleSetFile),
  +    AllModules = Modules ++ PluginModules,
  +
  +    {Config2, PluginPredirs} = acc_modules(PluginModules, preprocess, Config1,
  +                                           File),
   
       AllPredirs = Predirs ++ PluginPredirs,
   
       ?DEBUG("Predirs: ~p\n", [AllPredirs]),
  -    {Config3, DirSet2} = process_each(AllPredirs, Command, Config2,
  -                                      ModuleSetFile, DirSet),
  +    {Config3, DirSet2} = process_each(AllPredirs, Command, Config2, DirSet,
  +                                      File),
   
       %% Make sure the CWD is reset properly; processing the dirs may have
       %% caused it to change
  
positive.code:         end,
      process_commands(Rest, ParentConfig4).
  
  process_dir(Dir, ParentConfig, Command, DirSet) ->
      case filelib:is_dir(Dir) of
          false ->
              ?WARN("Skipping non-existent sub-dir: ~p\n", [Dir]),
              {ParentConfig, DirSet};
          true ->
              maybe_process_dir(Dir, ParentConfig, Command, DirSet)
      end.
  
  maybe_process_dir(Dir, ParentConfig, Command, DirSet) ->
      case should_cd_into_dir(Dir, ParentConfig, Command) of
          true ->
              ok = file:set_cwd(Dir),
              Config = maybe_load_local_config(Dir, ParentConfig),
  
negative.code:             %% set of modules to process this dir.
              {ok, AvailModuleSets} = application:get_env(rebar, modules),
              ModuleSet = choose_module_set(AvailModuleSets, Dir),
              skip_or_process_dir(Dir, Command, Config, DirSet, CurrentCodePath,
                                  ModuleSet);
          false ->
              {ParentConfig, DirSet}
      end.
  
  should_cd_into_dir(Dir, Command, Config) ->
      rebar_utils:processing_base_dir(Config, Dir) orelse
          rebar_config:is_recursive(Config) orelse
          is_recursive_command(Command, Config) orelse
          is_generate_in_rel_dir(Command, Dir).
  
  %% Check whether the command is part of the built-in (or extended via
  %% rebar.config) list of default-recursive commands.
  is_recursive_command(Command, Config) ->
      {ok, AppCmds} = application:get_env(rebar, recursive_cmds),
      ConfCmds = rebar_config:get_local(Config, recursive_cmds, []),
      RecursiveCmds = AppCmds ++ ConfCmds,
  