-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrebar.config
86 lines (75 loc) · 3.33 KB
/
rebar.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{erl_opts, [
debug_info,
warnings_as_errors,
warn_export_vars,
warn_unused_import,
warn_missing_spec_all
]}.
{deps, []}.
{minimum_otp_vsn, "27"}.
{erlfmt, [
write,
{files, ["{src,include,test}/*.{hrl,erl,app.src}", "rebar.config"]},
{exclude_files, []},
{print_width, 120}
]}.
{project_plugins, [
erlfmt
]}.
{profiles, [
{test, [
{erl_opts, [
nowarn_export_all,
nowarn_missing_spec_all
]}
]}
]}.
{dialyzer, [
{warnings, [unknown]},
{plt_apps, all_deps},
{plt_extra_apps, []}
]}.
{xref_checks, [
undefined_function_calls,
undefined_functions,
locals_not_used,
deprecated_function_calls,
deprecated_functions
]}.
{escript_name, edb}.
% +sbwt* none - By default the Erlang VM is optimised for latency, with schedulers spinning in busy loops fairly frequently
% to avoid cost of OS sleep + wake cycle.
% This is not necessary for us. The escript exists alongside other programs on the machine, so
% we should give all the flexibility to the OS to schedule resources as necessary.
% +A0 - Async threads are used only for old-style async port drivers. We don't use them, so save a thread
% -noinput - Do not try to read any input. Required to be able to access stdin/out via a port
% -kernel connect_all false - Do not actively connect to all nodes that you become aware of
% -escript main edb_main - Specify the entry point for the Escript
{escript_emu_args,
"%%! +sbwt none +sbwtdcpu none +sbwtdio none +A0 -noinput -kernel connect_all false -escript main edb_main\n"}.
% Some of the test suites perform E2E tests on the edb Escript, so
% ensure the Escript is produced and copied to the appropriate data directories.
% Ideally we'd only execute this for the relevant test suites, but this is a simple enough approximation
{pre_hooks, [
{ct, "rebar3 escriptize"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_attachment_SUITE_data"},
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_attachment_SUITE_data"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_main_SUITE_data"},
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_main_SUITE_data"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_dap_scopes_SUITE_data"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_dap_pause_SUITE_data"},
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_dap_pause_SUITE_data"}
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_dap_scopes_SUITE_data"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_dap_session_SUITE_data"},
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_dap_session_SUITE_data"},
{ct, "mkdir -p _build/test/lib/edb/test/edb_dap_steps_SUITE_data"},
{ct, "cp _build/default/bin/edb _build/test/lib/edb/test/edb_dap_steps_SUITE_data"}
]}.
% We select `ex_doc` as the documentation provider. This renders documentation in Elixir style, as opposed to the old Erlang EDoc style.
{hex, [{doc, ex_doc}]}.
% Customize how pages are rendered, adding the main entry point and eventual extra pages
{ex_doc, [
{source_url, <<"https://github.com/WhatsApp/edb">>},
{extras, [<<"README.md">>, <<"LICENSE.md">>]},
{main, <<"README.md">>}
]}.