anchor.diff:      end,
       compile_deps(T).
   
  -compile_app(Dir) ->
  -    SrcDir = src(Dir),
  -    IncDir = include(Dir),
  -    case file:list_dir(SrcDir) of
  -        {ok, Files} ->
  -            EbinDir = ebin(Dir),
  -            lists:foreach(compile_fun(SrcDir, EbinDir, IncDir), Files);
  -        {error, _} ->
  -            ok
  -    end.
  -
  +%% add application directory (its ebin) and its dependencies to the code path
  +update_path(Dir) ->
  +    Ebin = filename:join([Dir, "ebin"]),
  +    code:add_path(Ebin),
  +
  +    RebarFile = rebar_config_file(Dir),
  +    case deps(RebarFile) of
  +        {ok, Deps} ->
  +            code:add_paths(deps_ebin(Deps));
  +        {error, _} ->
  +            ok
  +    end.
  +
  +init() ->
  +    {ok, Cwd} = file:get_cwd(),
  +    update_path(Cwd).
  +
  +
  +%% internal
   exec(Cmd, Opts) ->
       Opts1 = [concat([" ", X]) || X <- Opts],
       os:cmd(concat([Cmd, concat(Opts1)])).
  
positive.code:             end
      end.
  
  init() ->
      {ok, Cwd} = file:get_cwd(),
      update_path(Cwd).
  
negative.code:             ok
      end,
      compile_app(Dir).
  
  compile_app(Dir) ->
      SrcDir = src(Dir),
      IncDir = include(Dir),
      case file:list_dir(SrcDir) of
          {ok, Files} ->
              EbinDir = ebin(Dir),
              lists:foreach(compile_fun(SrcDir, EbinDir, IncDir), Files);
          {error, _} ->
              ok
      end.
  
  compile_deps([]) ->
      ok;
  