diff options
author | feng19 <feng_19@foxmail.com> | 2018-06-21 10:24:56 +0800 |
---|---|---|
committer | feng19 <feng_19@foxmail.com> | 2018-06-21 10:24:56 +0800 |
commit | 482718b8bf31024d919aabad1da2e9116411f2aa (patch) | |
tree | 1c693d007b98b0fc31a23aac19abbf94096ad9ef /src/rebar_erlc_compiler.erl | |
parent | dc0f8b4d66d12c10ed4df85148b5e8ce13056f40 (diff) | |
parent | 38865da7ba01e7d5e60316e970f01959e85759ee (diff) |
Merge tag '3.6.0' into refresh_paths
Bump to 3.6.0
- Introduce support of add and del operations for overrides
- OTP-21 compatibility
- Bump cth_readable for OTP-21 compat
- upgrade relx to 3.25.0
- upgrade bbmustache to 1.5.0
- run compile provider in default namespace from bare compiling (fixes
hooks for mix builds)
- Resolve string vs list crashing rebar3 in erl_first_files
- Create ERLANG_LIB_*_erl_interface environment variables only if erl_interface exists
- Add hooks to the upgrade command
- Add --start-clean flag to rebar3 shell
- Auto-boot main app in OTP app project templates
- Use maps for child spec examples in templates
Diffstat (limited to 'src/rebar_erlc_compiler.erl')
-rw-r--r-- | src/rebar_erlc_compiler.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rebar_erlc_compiler.erl b/src/rebar_erlc_compiler.erl index c588a25..ebdd9dd 100644 --- a/src/rebar_erlc_compiler.erl +++ b/src/rebar_erlc_compiler.erl @@ -285,6 +285,7 @@ gather_src(Opts, BaseDirParts, [Dir|Rest], Srcs, CompileOpts) -> %% files, so that yet to be compiled parse transformations are excluded from it. erl_first_files(Opts, ErlOpts, Dir, NeededErlFiles) -> ErlFirstFilesConf = rebar_opts:get(Opts, erl_first_files, []), + valid_erl_first_conf(ErlFirstFilesConf), NeededSrcDirs = lists:usort(lists:map(fun filename:dirname/1, NeededErlFiles)), %% NOTE: order of files here is important! ErlFirstFiles = @@ -796,3 +797,10 @@ dir_recursive(Opts, Dir, CompileOpts) when is_list(CompileOpts) -> undefined -> rebar_dir:recursive(Opts, Dir); Recursive -> Recursive end. + +valid_erl_first_conf(FileList) -> + case rebar_utils:is_list_of_strings(FileList) of + true -> true; + false -> ?ABORT("An invalid file list (~p) was provided as part of your erl_files_first directive", + [FileList]) + end. |