summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Smith <dizzyd@dizzyd.com>2012-11-05 06:17:56 -0700
committerDave Smith <dizzyd@dizzyd.com>2012-11-05 06:19:02 -0700
commita7c32f8d985d3ea236e5b83c4049df29eaa90df2 (patch)
tree6786d9cf442abdc14815d1e4acccb77200dceb80
parentb1a947488b48db12c8f874f0b81232672b6ad810 (diff)
Add comment to explain why we're using sub_dirs by hand
-rw-r--r--src/rebar_xref.erl5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rebar_xref.erl b/src/rebar_xref.erl
index 42e6b9e..a55d71d 100644
--- a/src/rebar_xref.erl
+++ b/src/rebar_xref.erl
@@ -133,6 +133,11 @@ check_query({Query, Value}) ->
end.
code_path(Config) ->
+ %% Slight hack to ensure that sub_dirs get properly included
+ %% in code path for xref -- otherwise one gets a lot of undefined
+ %% functions, even though those functions are present as part
+ %% of compilation. H/t to @dluna. Long term we should tie more
+ %% properly into the overall compile code path if possible.
BaseDir = rebar_config:get_xconf(Config, base_dir),
[P || P <- code:get_path() ++
[filename:join(BaseDir, filename:join(SubDir, "ebin"))