This is now done in xrefr (`mk/xrefr`) and rabbimq-ct-helpers when
needed.
This has several benefits:
* This fixes `make run-broker` on Windows because the computed
`$ERL_LIBS` was invalid there.
* This saves a lot of Makefile processing time, because elixir(1) is
quite slow to startup. On my laptop, a complete build in
rabbitmq-server-release from 8.5 seconds to 3 seconds.
For Erlang-based applications, the path is expected to be
`$application/ebin` and Erlang.mk sets up everything for us.
For Elixir-based applications, the path is something like
`$application/_build/$env/lib/*/ebin`. To add those, first we make sure
that $(ERLANG_MK_RECURSIVE_DEPS_LIST) is generated because it will
contains all build and runtime dependencies paths, and we pass that
filename to xrefr(1) using an environment variable.
Then xrefr(1) parses that file and looks at all of them if they contain
`_build/dev/lib/*/ebin` directories. If that's the case, those are added
to the code path.
Later in the script, the code path is added to xref library path.
[#140125673]
In particular:
- If an MFA is listed in -ignore_xref(), ignore both the error in
the calling module having this -ignore_xref() and the undefined
MFA if any.
- Ignore all errors from functions listed in
-erlang_version_support() that will be "compiled-out" at runtime.
[#140125673]
It is forked from xref_runner. Compared to upstream, it allows to
exclude entire modules: we need that for the *_compat modules.
Furthermore it's compatible with Erlang R16B03 because:
- It's a plain text escript, not a precompiled one.
- It doesn't use maps.
[#140125673]