Skip to content

Commit

Permalink
Fix handling of -include_lib (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablo Costas Sánchez authored Jan 28, 2022
1 parent caf0fb9 commit 5dfbe2d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/rebar3_typer_prv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,18 @@ infer_src_dirs(State) ->
end.

dirs_from_app_discovery(State) ->
[dir_for_app(AppInfo) || AppInfo <- rebar_state:project_apps(State)].
ProjectSrcDirs = [dir_for_app(AppInfo) || AppInfo <- rebar_state:project_apps(State)],
Profiles =
lists:reverse(
rebar_state:current_profiles(State)),
EbinDirs =
[rebar_app_info:ebin_dir(AppInfo)
|| Profile <- Profiles,
AppInfo
<- rebar_state:get(State, {parsed_deps, Profile}, [])
++ rebar_state:project_apps(State)],
code:add_pathsa(EbinDirs),
ProjectSrcDirs.

-spec dir_for_app(rebar_app_info:t()) -> file:filename_all() | [].
dir_for_app(AppInfo) ->
Expand Down

0 comments on commit 5dfbe2d

Please sign in to comment.