anchor.diff:  %%
   %% @doc Produce a plain-text error message from a reason returned by
   %% for instance {@link file/2} or {@link proto_defs/2}.
  +-spec format_error(Err) -> iolist() when
  +      Err :: reason() | {error, reason()} | {error, reason(), [warning()]}.
   format_error({error, Reason, _Warns}) -> fmt_err(Reason);
   format_error({error, Reason})         -> fmt_err(Reason);
   format_error(Reason)                  -> fmt_err(Reason).
  
positive.code:                end
         end]).
  
  %% @spec msg_defs(Mod, Defs) -> CompRet
  %% @equiv msg_defs(Mod, Defs, [])
  %% @doc Deprecated, use proto_defs/2 instead.
  msg_defs(Mod, Defs) ->
      msg_defs(Mod, Defs, []).
  
  %% @spec msg_defs(Mod, Defs, Opts) -> CompRet
  %% @equiv proto_defs(Mod, Defs, Opts)
  %% @doc Deprecated, use proto_defs/2 instead.
  msg_defs(Mod, Defs, Opts) ->
      proto_defs(Mod, Defs, Opts).
  
  
negative.code: find_default_out_dir({_Mod, _S}) -> ".";
  find_default_out_dir(File) -> filename:dirname(File).
  
  %% @equiv proto_defs(Mod, Defs, [])
  -spec proto_defs(module(), gpb_parse:defs()) -> comp_ret().
  proto_defs(Mod, Defs) ->
      proto_defs(Mod, Defs, []).
  
  %% @doc
  %% Compile a list of pre-parsed definitions to file or to a binary.
  %% See {@link file/2} for information on options and return values.
  -spec proto_defs(module(), gpb_parse:defs(), opts()) -> comp_ret().
  proto_defs(Mod, Defs, Opts) ->
      do_proto_defs_aux1(Mod, Defs, normalize_opts(Opts)).
  
  