瀏覽代碼

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 年之前
父節點
當前提交
6fe40d0d34
共有 1 個檔案被更改,包括 5 行新增1 行删除
  1. +5
    -1
      src/rebar_compiler_erl.erl

+ 5
- 1
src/rebar_compiler_erl.erl 查看文件

@ -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)])
),

Loading…
取消
儲存