From 212655c3ecaf73a17e35bb7400e9f088d4d3df69 Mon Sep 17 00:00:00 2001 From: Kelly McLaughlin Date: Thu, 5 Feb 2015 22:02:59 -0700 Subject: Add xref support for multi-app projects Add xref support for multi-app projects. Instead of only adding the top-level ebin directory to the xref server use rebar_state:project_apps/1 to enumerate the applications for the project and add the ebin directory for each one. --- src/rebar_prv_xref.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rebar_prv_xref.erl b/src/rebar_prv_xref.erl index 32ebf46..49ae70e 100644 --- a/src/rebar_prv_xref.erl +++ b/src/rebar_prv_xref.erl @@ -96,7 +96,8 @@ prepare(State) -> rebar_state:get(State, xref_warnings, false)}, {verbose, rebar_log:is_verbose(State)}]), - {ok, _} = xref:add_directory(xref, "ebin"), + [{ok, _} = xref:add_directory(xref, rebar_app_info:ebin_dir(App)) + || App <- rebar_state:project_apps(State)], %% Save the code path prior to doing any further code path %% manipulation -- cgit v1.1