Commit Graph

5 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron da3e784a7a rabbitmq-build.mk: Don't add Elixir lib dir to `$ERL_LIBS`
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.
2019-12-05 12:29:30 +01:00
Jean-Sébastien Pédron 36ba07bb58 mk/xrefr: Add Elixir-based applications to code path
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]
2017-07-07 13:23:16 +02:00
Jean-Sébastien Pédron 3fa098e9a1 mk/xrefr: Skip missing directories
For instance, `test` doesn't exist in all projects.

[#140125673]
2017-06-30 16:30:16 +02:00
Jean-Sébastien Pédron 951d5f45a6 mk/xrefr: Adapt how the script ignores results to our needs
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]
2017-06-30 13:46:54 +02:00
Jean-Sébastien Pédron c42e53a6e0 mk/xrefr: Provide our own xrefr(1) escript
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]
2017-06-30 11:29:37 +02:00