Open filmor opened 5 months ago
I also found that custom apps are not compiled in the correct order.
In the rebar_prv_compile.erl
:
build_apps(DAGs, Apps, State) ->
{Rebar3, Custom} = lists:partition(
fun(AppInfo) ->
Type = rebar_app_info:project_type(AppInfo),
Type =:= rebar3 orelse Type =:= undefined
end,
Apps
),
[build_custom_builder_app(AppInfo, State) || AppInfo <- Custom],
build_rebar3_apps(DAGs, Rebar3, State).
The Custom
apps separated from all Apps
are not in the correct order. They can't even be separated. For example, a project depends on an Elixir app grpc
, and the grpc
depends on some Erlang apps like cowboy
and others. In this case, neither the custom apps nor rebar3 apps will compile.
Currently, we seem to compile Erlang dependencies after all Elixir deps. This leads to compiler warnings as the modules that Elixir expects (in particular this happens with
telemetry
don't exist yet on the first compilation. It could also lead to errors if the Elixir code actually tried to use something from the Erlang dep (e.g. a header).Related #14