anchor.diff:      case erlydtl:compile(Source,
                            module_name(Target),
                            Opts) of
  -        ok -> ok;
  -        {error, {File, [{Pos, _Mod, Err}]}} ->
  -            ?ERROR("Compiling template ~p failed:~n    (~s): ~p~n",
  -                [File, err_location(Pos), Err]);
  -        Reason ->
  -            ?ERROR("Compiling template ~s failed:~n  ~p~n",
  -                   [Source, Reason]),
  -            ?FAIL
  -    end.
  -
  -err_location({L,C}) -> io_lib:format("line:~w, col:~w", [L, C]);
  -err_location(L)     -> io_lib:format("line:~w", [L]).
  +        ok ->
  +            ok;
  +        error ->
  +            rebar_base_compiler:error_tuple(Config, Source, [], [], Opts);
  +        {error, {_File, _Msgs} = Error} ->
  +            rebar_base_compiler:error_tuple(Config, Source, [Error], [], Opts);
  +        {error, Msg} ->
  +            Es = [{Source, [{erlydtl_parser, Msg}]}],
  +            rebar_base_compiler:error_tuple(Config, Source, Es, [], Opts)
  +    end.
   
   module_name(Target) ->
       F = filename:basename(Target),
  
positive.code:         _ ->
              case needs_compile(Source, Target, DtlOpts) of
                  true ->
                      do_compile(Source, Target, DtlOpts);
                  false ->
                      skipped
              end
      end.
  
  do_compile(Source, Target, DtlOpts) ->
      %% TODO: Check last mod on target and referenced DTLs here..
  
      %% ensure that doc_root and out_dir are defined,
  
negative.code:                                      option(source_ext, DtlOpts),
                                       option(out_dir, DtlOpts),
                                       option(module_ext, DtlOpts) ++ ".beam",
                                       fun(S, T, C) ->
                                          compile_dtl(C, S, T, DtlOpts)
                                       end,
                                       [{check_last_mod, false},
                                        {recursive, option(recursive, DtlOpts)}])
  