Skip to content

Commit

Permalink
Filter away un-supported functions
Browse files Browse the repository at this point in the history
  • Loading branch information
robertoaloi committed Feb 16, 2024
1 parent 8b6c828 commit 9b0941d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/rebar/src/rebar_prv_manifest.erl
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,16 @@ options() ->
get_manifest(State) ->
ProjectApps = rebar_state:project_apps(State),
DepApps = rebar_state:all_deps(State),
#{apps => [adapt_context(App) || App <- ProjectApps],
deps => [adapt_context(App) || App <- DepApps],
#{apps => [adapt_context(App) || App <- ProjectApps, is_supported(App)],
deps => [adapt_context(App) || App <- DepApps, is_supported(App)],
otp_lib_dir => code:lib_dir(),
source_root => rebar_state:dir(State)}.

-spec is_supported(rebar_app_info:t()) -> boolean().
is_supported(App) ->
Type = rebar_app_info:project_type(App),
Type =:= rebar3 orelse Type =:= undefined.

-spec adapt_context(rebar_app_info:t()) -> app_context().
adapt_context(App) ->
Context0 = rebar_compiler_erl:context(App),
Expand Down

0 comments on commit 9b0941d

Please sign in to comment.