Commit ace5688
authored
Handle :compile.file/2 returning :error on OTP 24 (#10742)
Before OTP 24 when given invalid args, :compile.file/2 would return:
iex(1)> :compile.file('a.erl', [{:d, 'foo', 'bar'}, :report])
{:error, :badarg}
On OTP 24:
iex(1)> :compile.file('a.erl', [{:d, 'foo', 'bar'}, :report])
*** Internal compiler error ***
exception error: bad argument
in function io_lib:format/2
called as io_lib:format("badly formed '~s'",[{"foo","bar"}])
in call from sys_messages:list_errors/3 (sys_messages.erl, line 53)
in call from lists:foreach/2 (lists.erl, line 1342)
in call from compile:comp_ret_err/1 (compile.erl, line 546)
in call from compile:'-internal_fun/2-anonymous-0-'/2 (compile.erl, line 229)
in call from compile:'-do_compile/2-anonymous-0-'/1 (compile.erl, line 219)
:error1 parent b17d3a6 commit ace5688
File tree
2 files changed
+4
-3
lines changed- lib/mix
- lib/mix/tasks
- test/mix/tasks
2 files changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
| 104 | + | |
104 | 105 | | |
105 | | - | |
| 106 | + | |
106 | 107 | | |
107 | 108 | | |
108 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments