summaryrefslogtreecommitdiff
path: root/src/rebar_erlc_compiler.erl
diff options
context:
space:
mode:
authorSlava Yurin <YurinVV@ya.ru>2015-01-15 11:07:45 +0600
committerJoseph Wayne Norton <norton@alum.mit.edu>2015-01-26 20:41:38 -0600
commitd7657ba73228d26bd70553367bb22d5efe1f9ec6 (patch)
tree7b874b56570fe190f990479a29927aeb0d576d25 /src/rebar_erlc_compiler.erl
parentb488179030944d24a3a559cf45aac461e6155470 (diff)
downloadrebar-d7657ba73228d26bd70553367bb22d5efe1f9ec6.tar.gz
Keep order for erl_first_files
Diffstat (limited to 'src/rebar_erlc_compiler.erl')
-rw-r--r--src/rebar_erlc_compiler.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl
index c4cd7b1..198592d 100644
--- a/src/rebar_erlc_compiler.erl
+++ b/src/rebar_erlc_compiler.erl
@@ -303,11 +303,11 @@ doterl_compile(Config, OutDir, MoreSources, ErlOpts) ->
%% (rebar_config:get_local instead of rebar_config:get_list), consider
%% logging a warning message for any file listed in erl_first_files which
%% wasn't found via gather_src.
- {ErlFirstFiles, RestErls} =
- lists:partition(
- fun(Source) ->
- lists:member(Source, ErlFirstFilesConf)
- end, AllErlFiles),
+ RestErls = [File || File <- AllErlFiles,
+ not lists:member(File, ErlFirstFilesConf)],
+ %% NOTE: order of files in ErlFirstFiles is important!
+ ErlFirstFiles = [File || File <- ErlFirstFilesConf,
+ lists:member(File, AllErlFiles)],
%% Make sure that ebin/ exists and is on the path
ok = filelib:ensure_dir(filename:join("ebin", "dummy.beam")),
CurrPath = code:get_path(),