1 |
commit: caa9bafa89e86a14ac407f24bd3d43709c7ce5df |
2 |
Author: Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at> |
3 |
AuthorDate: Mon Sep 12 17:18:20 2022 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 12 17:25:56 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=caa9bafa |
7 |
|
8 |
dev-lang/elixir: remove unused patches |
9 |
|
10 |
Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at> |
11 |
Portage 3.0.36 / pkgdev 0.2.1 / pkgcheck 0.10.14 |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27230 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
dev-lang/elixir/files/elixir-1.11.2-mksh.patch | 81 ------------- |
16 |
...4-fix-logger-translator-with-otp-24-11222.patch | 64 ----------- |
17 |
...11.4-update-warnings-for-OTP-master-10807.patch | 125 --------------------- |
18 |
3 files changed, 270 deletions(-) |
19 |
|
20 |
diff --git a/dev-lang/elixir/files/elixir-1.11.2-mksh.patch b/dev-lang/elixir/files/elixir-1.11.2-mksh.patch |
21 |
deleted file mode 100644 |
22 |
index 3fda43156890..000000000000 |
23 |
--- a/dev-lang/elixir/files/elixir-1.11.2-mksh.patch |
24 |
+++ /dev/null |
25 |
@@ -1,81 +0,0 @@ |
26 |
-From 69bb81635a77afb28419103bdb02867b48994d4a Mon Sep 17 00:00:00 2001 |
27 |
-From: "Haelwenn (lanodan) Monnier" <contact@×××××××××.me> |
28 |
-Date: Wed, 9 Dec 2020 18:21:34 +0100 |
29 |
-Subject: [PATCH] bin/elixir: Rename erl() function to erl_set() |
30 |
-MIME-Version: 1.0 |
31 |
-Content-Type: text/plain; charset=UTF-8 |
32 |
-Content-Transfer-Encoding: 8bit |
33 |
- |
34 |
-It conflicted with the erl executable for Korn-derived shells where a function |
35 |
-can be used in `exec command`. |
36 |
- |
37 |
-It isn't clear which behavior is expected from reading the POSIX specification |
38 |
-but "Shell Command Language § 2.9.1 Simple Commands" clears the usage of |
39 |
-the term `command` quite well. |
40 |
-And even with excluding functions from the `command` operand of `exec`, |
41 |
-why are aliases accepted? (in most if not all shells) |
42 |
- |
43 |
-See: https://bugs.gentoo.org/729964 |
44 |
---- |
45 |
- bin/elixir | 28 ++++++++++++++-------------- |
46 |
- 1 file changed, 14 insertions(+), 14 deletions(-) |
47 |
- |
48 |
---- a/bin/elixir |
49 |
-+++ b/bin/elixir |
50 |
-@@ -70,7 +70,7 @@ readlink_f () { |
51 |
- ERL="" |
52 |
- |
53 |
- # Stores erl arguments preserving spaces/quotes (mimics an array) |
54 |
--erl () { |
55 |
-+erl_set () { |
56 |
- eval "E${E}=\$1" |
57 |
- E=$((E + 1)) |
58 |
- } |
59 |
-@@ -137,34 +137,34 @@ while [ $I -le $LENGTH ]; do |
60 |
- ;; |
61 |
- --cookie) |
62 |
- S=2 |
63 |
-- erl "-setcookie" |
64 |
-- erl "$2" |
65 |
-+ erl_set "-setcookie" |
66 |
-+ erl_set "$2" |
67 |
- ;; |
68 |
- --sname|--name) |
69 |
- S=2 |
70 |
-- erl "$(echo "$1" | cut -c 2-)" |
71 |
-- erl "$2" |
72 |
-+ erl_set "$(echo "$1" | cut -c 2-)" |
73 |
-+ erl_set "$2" |
74 |
- ;; |
75 |
- --erl-config) |
76 |
- S=2 |
77 |
-- erl "-config" |
78 |
-- erl "$2" |
79 |
-+ erl_set "-config" |
80 |
-+ erl_set "$2" |
81 |
- ;; |
82 |
- --vm-args) |
83 |
- S=2 |
84 |
-- erl "-args_file" |
85 |
-- erl "$2" |
86 |
-+ erl_set "-args_file" |
87 |
-+ erl_set "$2" |
88 |
- ;; |
89 |
- --boot) |
90 |
- S=2 |
91 |
-- erl "-boot" |
92 |
-- erl "$2" |
93 |
-+ erl_set "-boot" |
94 |
-+ erl_set "$2" |
95 |
- ;; |
96 |
- --boot-var) |
97 |
- S=3 |
98 |
-- erl "-boot_var" |
99 |
-- erl "$2" |
100 |
-- erl "$3" |
101 |
-+ erl_set "-boot_var" |
102 |
-+ erl_set "$2" |
103 |
-+ erl_set "$3" |
104 |
- ;; |
105 |
- --pipe-to) |
106 |
- S=3 |
107 |
|
108 |
diff --git a/dev-lang/elixir/files/elixir-1.11.4-fix-logger-translator-with-otp-24-11222.patch b/dev-lang/elixir/files/elixir-1.11.4-fix-logger-translator-with-otp-24-11222.patch |
109 |
deleted file mode 100644 |
110 |
index 428e7ceb3ab4..000000000000 |
111 |
--- a/dev-lang/elixir/files/elixir-1.11.4-fix-logger-translator-with-otp-24-11222.patch |
112 |
+++ /dev/null |
113 |
@@ -1,64 +0,0 @@ |
114 |
-From b1492cb0cfa689c4c098761a375d5cb728d3c175 Mon Sep 17 00:00:00 2001 |
115 |
-From: Matteo <mbrancaleoni@×××××.com> |
116 |
-Date: Tue, 31 Aug 2021 23:46:27 +0200 |
117 |
-Subject: [PATCH 3/3] Fix logger translator with otp-24 (#11222) |
118 |
-MIME-Version: 1.0 |
119 |
-Content-Type: text/plain; charset=UTF-8 |
120 |
-Content-Transfer-Encoding: 8bit |
121 |
- |
122 |
-* Handle new significant key in sasl reports |
123 |
- |
124 |
-* Add OTP-24.0 to CI matrix |
125 |
- |
126 |
-Co-authored-by: José Valim <jose.valim@×××××××.co> |
127 |
---- |
128 |
- .github/workflows/ci.yml | 2 +- |
129 |
- lib/logger/lib/logger/translator.ex | 13 ++++++++++--- |
130 |
- 2 files changed, 11 insertions(+), 4 deletions(-) |
131 |
- |
132 |
-diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml |
133 |
-index f43a9ff62..a4bc8dbeb 100644 |
134 |
---- a/.github/workflows/ci.yml |
135 |
-+++ b/.github/workflows/ci.yml |
136 |
-@@ -15,7 +15,7 @@ jobs: |
137 |
- strategy: |
138 |
- fail-fast: false |
139 |
- matrix: |
140 |
-- otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0'] |
141 |
-+ otp_release: ['OTP-24.0', 'OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0'] |
142 |
- development: [false] |
143 |
- include: |
144 |
- - otp_release: master |
145 |
-diff --git a/lib/logger/lib/logger/translator.ex b/lib/logger/lib/logger/translator.ex |
146 |
-index d1d7e62f1..8afd79436 100644 |
147 |
---- a/lib/logger/lib/logger/translator.ex |
148 |
-+++ b/lib/logger/lib/logger/translator.ex |
149 |
-@@ -357,15 +357,22 @@ defp child_info(_min_level, _child) do |
150 |
- [] |
151 |
- end |
152 |
- |
153 |
-- defp child_debug(:debug, restart_type: restart, shutdown: shutdown, child_type: type) do |
154 |
-- ["\nRestart: ", inspect(restart), "\nShutdown: ", inspect(shutdown)] ++ |
155 |
-- ["\nType: ", inspect(type)] |
156 |
-+ defp child_debug(:debug, opts) do |
157 |
-+ for {key, value} <- opts do |
158 |
-+ child_debug_key(key, value) |
159 |
-+ end |
160 |
- end |
161 |
- |
162 |
- defp child_debug(_min_level, _child) do |
163 |
- [] |
164 |
- end |
165 |
- |
166 |
-+ defp child_debug_key(:restart_type, value), do: ["\nRestart: " | inspect(value)] |
167 |
-+ defp child_debug_key(:shutdown, value), do: ["\nShutdown: " | inspect(value)] |
168 |
-+ defp child_debug_key(:child_type, value), do: ["\nType: " | inspect(value)] |
169 |
-+ defp child_debug_key(:significant, value), do: if(value, do: "\nSignificant: true", else: []) |
170 |
-+ defp child_debug_key(_, _), do: [] |
171 |
-+ |
172 |
- defp report_crash(min_level, [[{:initial_call, initial_call} | crashed], linked]) do |
173 |
- mfa = initial_call_to_mfa(initial_call) |
174 |
- report_crash(min_level, crashed, [{:initial_call, mfa}], linked) |
175 |
--- |
176 |
-2.31.1 |
177 |
- |
178 |
|
179 |
diff --git a/dev-lang/elixir/files/elixir-1.11.4-update-warnings-for-OTP-master-10807.patch b/dev-lang/elixir/files/elixir-1.11.4-update-warnings-for-OTP-master-10807.patch |
180 |
deleted file mode 100644 |
181 |
index 2cc0b217cbb1..000000000000 |
182 |
--- a/dev-lang/elixir/files/elixir-1.11.4-update-warnings-for-OTP-master-10807.patch |
183 |
+++ /dev/null |
184 |
@@ -1,125 +0,0 @@ |
185 |
-From 237a71311c5ae4fc5dd3c7a590a7b6dab97a664a Mon Sep 17 00:00:00 2001 |
186 |
-From: Wojtek Mach <wojtekmach@××××××××××××××××××××.com> |
187 |
-Date: Tue, 23 Mar 2021 17:40:04 +0100 |
188 |
-Subject: [PATCH 2/3] Update warnings for OTP master (#10807) |
189 |
- |
190 |
---- |
191 |
- lib/elixir/src/elixir_erl_compiler.erl | 34 ++++++++++++------- |
192 |
- .../test/elixir/kernel/warning_test.exs | 25 -------------- |
193 |
- 2 files changed, 21 insertions(+), 38 deletions(-) |
194 |
- |
195 |
-diff --git a/lib/elixir/src/elixir_erl_compiler.erl b/lib/elixir/src/elixir_erl_compiler.erl |
196 |
-index 7010b59fd..e0aa05114 100644 |
197 |
---- a/lib/elixir/src/elixir_erl_compiler.erl |
198 |
-+++ b/lib/elixir/src/elixir_erl_compiler.erl |
199 |
-@@ -94,6 +94,8 @@ handle_file_warning(true, _File, {_Line, sys_core_fold, {nomatch_shadow, _}}) -> |
200 |
- |
201 |
- %% Those we implement ourselves |
202 |
- handle_file_warning(_, _File, {_Line, v3_core, {map_key_repeated, _}}) -> ok; |
203 |
-+handle_file_warning(_, _File, {_Line, sys_core_fold, {ignored, useless_building}}) -> ok; |
204 |
-+%% TODO: remove when we require Erlang/OTP 24 |
205 |
- handle_file_warning(_, _File, {_Line, sys_core_fold, useless_building}) -> ok; |
206 |
- |
207 |
- %% Ignore all linting errors (only come up on parse transforms) |
208 |
-@@ -112,11 +114,11 @@ handle_file_error(File, {Line, Module, Desc}) -> |
209 |
- elixir_errors:compile_error([{line, Line}], File, Message). |
210 |
- |
211 |
- %% Mention the capture operator in make_fun |
212 |
--custom_format(sys_core_fold, {no_effect, {erlang, make_fun, 3}}) -> |
213 |
-+custom_format(sys_core_fold, {ignored, {no_effect, {erlang, make_fun, 3}}}) -> |
214 |
- "the result of the capture operator & (:erlang.make_fun/3) is never used"; |
215 |
- |
216 |
- %% Make no_effect clauses pretty |
217 |
--custom_format(sys_core_fold, {no_effect, {erlang, F, A}}) -> |
218 |
-+custom_format(sys_core_fold, {ignored, {no_effect, {erlang, F, A}}}) -> |
219 |
- {Fmt, Args} = case erl_internal:comp_op(F, A) of |
220 |
- true -> {"use of operator ~ts has no effect", [elixir_utils:erlang_comparison_op_to_elixir(F)]}; |
221 |
- false -> |
222 |
-@@ -127,12 +129,20 @@ custom_format(sys_core_fold, {no_effect, {erlang, F, A}}) -> |
223 |
- end, |
224 |
- io_lib:format(Fmt, Args); |
225 |
- |
226 |
--%% Rewrite nomatch_guard to be more generic it can happen inside if, unless, and the like |
227 |
--custom_format(sys_core_fold, nomatch_guard) -> |
228 |
-+%% Rewrite nomatch to be more generic, it can happen inside if, unless, and the like |
229 |
-+custom_format(sys_core_fold, {nomatch, X}) when X == guard; X == no_clause -> |
230 |
- "this check/guard will always yield the same result"; |
231 |
- |
232 |
-+custom_format(sys_core_fold, {nomatch, {shadow, Line, {ErlName, ErlArity}}}) -> |
233 |
-+ {Name, Arity} = elixir_utils:erl_fa_to_elixir_fa(ErlName, ErlArity), |
234 |
-+ |
235 |
-+ io_lib:format( |
236 |
-+ "this clause for ~ts/~B cannot match because a previous clause at line ~B always matches", |
237 |
-+ [Name, Arity, Line] |
238 |
-+ ); |
239 |
-+ |
240 |
- %% Handle literal eval failures |
241 |
--custom_format(sys_core_fold, {eval_failure, {Mod, Name, Arity}, Error}) -> |
242 |
-+custom_format(sys_core_fold, {failed, {eval_failure, {Mod, Name, Arity}, Error}}) -> |
243 |
- #{'__struct__' := Struct} = 'Elixir.Exception':normalize(error, Error), |
244 |
- {ExMod, ExName, ExArgs} = elixir_rewrite:erl_to_ex(Mod, Name, lists:duplicate(Arity, nil)), |
245 |
- Call = 'Elixir.Exception':format_mfa(ExMod, ExName, length(ExArgs)), |
246 |
-@@ -143,18 +153,16 @@ custom_format(sys_core_fold, {eval_failure, {Mod, Name, Arity}, Error}) -> |
247 |
- ["the call to ", Trimmed, " will fail with ", elixir_aliases:inspect(Struct)]; |
248 |
- |
249 |
- %% TODO: remove when we require OTP 24 |
250 |
-+custom_format(sys_core_fold, {nomatch_shadow, Line, FA}) -> |
251 |
-+ custom_format(sys_core_fold, {nomatch, {shadow, Line, FA}}); |
252 |
-+custom_format(sys_core_fold, nomatch_guard) -> |
253 |
-+ custom_format(sys_core_fold, {nomatch, guard}); |
254 |
-+custom_format(sys_core_fold, {no_effect, X}) -> |
255 |
-+ custom_format(sys_core_fold, {ignored, {no_effect, X}}); |
256 |
- custom_format(sys_core_fold, {eval_failure, Error}) -> |
257 |
- #{'__struct__' := Struct} = 'Elixir.Exception':normalize(error, Error), |
258 |
- ["this expression will fail with ", elixir_aliases:inspect(Struct)]; |
259 |
- |
260 |
--custom_format(sys_core_fold, {nomatch_shadow,Line,{ErlName,ErlArity}}) -> |
261 |
-- {Name, Arity} = elixir_utils:erl_fa_to_elixir_fa(ErlName, ErlArity), |
262 |
-- |
263 |
-- io_lib:format( |
264 |
-- "this clause for ~ts/~B cannot match because a previous clause at line ~B always matches", |
265 |
-- [Name, Arity, Line] |
266 |
-- ); |
267 |
-- |
268 |
- custom_format([], Desc) -> |
269 |
- io_lib:format("~p", [Desc]); |
270 |
- |
271 |
-diff --git a/lib/elixir/test/elixir/kernel/warning_test.exs b/lib/elixir/test/elixir/kernel/warning_test.exs |
272 |
-index 15a984a54..37334ff65 100644 |
273 |
---- a/lib/elixir/test/elixir/kernel/warning_test.exs |
274 |
-+++ b/lib/elixir/test/elixir/kernel/warning_test.exs |
275 |
-@@ -1154,31 +1154,6 @@ def foo(x), do: :ok |
276 |
- purge(Sample) |
277 |
- end |
278 |
- |
279 |
-- test "with and do clauses emit errors, else clauses do not" do |
280 |
-- assert capture_err(fn -> |
281 |
-- Code.compile_string(""" |
282 |
-- with {:first, int} when is_integer(int) <- {:second, Integer.gcd(2, 4)} do |
283 |
-- int |
284 |
-- end |
285 |
-- """) |
286 |
-- end) =~ "this clause cannot match" |
287 |
-- |
288 |
-- assert capture_err(fn -> |
289 |
-- Code.compile_string(""" |
290 |
-- with {:first, int1} when is_integer(int1) <- {:first, Integer.gcd(2, 4)}, |
291 |
-- {:second, int2} when is_integer(int2) <- {:second, Integer.gcd(2, 4)} do |
292 |
-- {:ok, int1 + int2} |
293 |
-- else |
294 |
-- {:first, nil} -> {:error, "first number is not integer"} |
295 |
-- {:second, nil} -> {:error, "second number is not integer"} |
296 |
-- end |
297 |
-- """) |
298 |
-- end) == "" |
299 |
-- after |
300 |
-- purge(Sample1) |
301 |
-- purge(Sample2) |
302 |
-- end |
303 |
-- |
304 |
- test "warning on code point escape" do |
305 |
- assert capture_err(fn -> |
306 |
- Code.eval_string("? ") |
307 |
--- |
308 |
-2.31.1 |
309 |
- |