Sfoglia il codice sorgente

fix parallel compilation

now all sources have at least one edge with 'artifact' label,
let's ignore it when choosing whether to compile in parallel
or sequentially
pull/2246/head
Maxim Fedorov 5 anni fa
parent
commit
6fe40d0d34
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +5
    -1
      src/rebar_compiler_erl.erl

+ 5
- 1
src/rebar_compiler_erl.erl Vedi File

@ -70,7 +70,11 @@ needed_files(Graph, FoundFiles, _, AppInfo) ->
%% that none other depend of; the former must be sequentially
%% built, the rest is parallelizable.
OtherErls = lists:partition(
fun(Erl) -> digraph:in_degree(Graph, Erl) > 0 end,
fun(Erl) -> lists:any(
fun(Edge) ->
{_E, _V1, _V2, Kind} = digraph:edge(Graph, Edge),
Kind =:= artifact
end, digraph:in_edges(Graph, Erl)) end,
lists:reverse([Dep || Dep <- DepErlsOrdered,
not lists:member(Dep, ErlFirstFiles)])
),

Caricamento…
Annulla
Salva