From 9a6f04a2d9d00167e0b853776b60b12b5c5dcc57 Mon Sep 17 00:00:00 2001 From: Fred Hebert Date: Wed, 7 Jun 2017 20:12:49 -0400 Subject: Fix xref compile hook on deps If xref analysis is being run by a dependency during its compilation phase, the xref provider will try to add that deps' parents to the check job while the ebin/ directories for them do not exist. This causes a crash. This patch makes it so directories are only added if they are existing, preventing failure on any compile hook for dependencies and allowing successful compilation as a best effort. --- .../recursive/apps/rebar_issue1/rebar.config | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config (limited to 'test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config') diff --git a/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config b/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config new file mode 100644 index 0000000..cf48edf --- /dev/null +++ b/test/rebar_xref_SUITE_data/recursive/apps/rebar_issue1/rebar.config @@ -0,0 +1,12 @@ +{erl_opts, [debug_info]}. +{deps, []}. + +{xref_checks,[ + undefined_function_calls, + undefined_functions, + locals_not_used, + deprecated_function_calls, + deprecated_functions +]}. + +{provider_hooks, [{post, [{compile, xref}]}]}. -- cgit v1.1