{erl_opts, [
debug_info,
warnings_as_errors,
warn_unused_vars,
warn_export_all
]}.
{deps, [
{rocksdb, "3.0.0"},
{mimerl, "1.5.0"},
{hlc, "3.0.4"},
{match_trie, "1.0.0"},
%% OpenTelemetry metrics via instrument.
{instrument, "1.1.4"}
]}.
%% instrument (and its hackney dep) still use the prefix `catch' operator,
%% deprecated on OTP 29. Scope the suppression to those dependencies so our
%% own code stays strict (no blanket nowarn_deprecated_catch in erl_opts above).
{overrides, [
{add, instrument, [{erl_opts, [nowarn_deprecated_catch]}]},
{add, hackney, [{erl_opts, [nowarn_deprecated_catch]}]}
]}.
{project_plugins, [
rebar3_hex,
rebar3_ex_doc
]}.
%% EUnit configuration
{eunit_opts, [verbose]}.
{cover_enabled, true}.
%% Common Test configuration
{ct_opts, [{verbose, true}]}.
%% Shell configuration for development
{shell, [
{apps, [barrel_docdb]}
]}.
%% Xref configuration - skip exports_not_used (too many false positives from OTP behaviors)
%% Use `rebar3 as strict xref` to check for unused exports during development
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
%% Dialyzer configuration
{dialyzer, [
{warnings, [
unmatched_returns,
error_handling,
unknown,
no_return
]},
{plt_extra_apps, [rocksdb, mimerl, public_key, inets]}
]}.
%% HexDocs configuration
{hex, [{doc, ex_doc}]}.
{ex_doc, [
{source_url, <<"https://github.com/barrel-db/barrel_docdb">>},
{homepage_url, <<"https://docs.barrel-db.eu/docdb/">>},
{extras, [<<"LICENSE">>]},
{main, <<"api-reference">>},
{api_reference, true},
{skip_undefined_reference_warnings_on, [<<".*">>]}
]}.
%% Release configuration
{relx, [
{release, {barrel_docdb, "0.8.0"}, [
barrel_docdb,
sasl,
instrument,
runtime_tools
]},
{dev_mode, true},
{include_erts, false},
{extended_start_script, true},
{sys_config, "config/sys.config"},
{vm_args, "config/vm.args"},
{overlay, [
{mkdir, "data"},
{mkdir, "log"}
]}
]}.
{profiles, [
{prod, [
{relx, [
{dev_mode, false},
{include_erts, true},
{sys_config_src, "config/sys.config.src"},
{vm_args_src, "config/vm.args.src"}
]}
]},
{test, [
{deps, [
{meck, "1.2.0"}
]}
]},
%% Strict profile for checking unused exports: rebar3 as strict xref
{strict, [
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
exports_not_used,
deprecated_function_calls,
deprecated_functions
]}
]}
]}.