* [gentoo-commits] repo/gentoo:master commit in: dev-lang/elixir/, dev-lang/elixir/files/
@ 2020-12-13 13:00 Sergei Trofimovich
0 siblings, 0 replies; 4+ messages in thread
From: Sergei Trofimovich @ 2020-12-13 13:00 UTC (permalink / raw
To: gentoo-commits
commit: 8b417be714a45559a9c29eec3c13c600cedff0f2
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 13 12:52:32 2020 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Sun Dec 13 13:00:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8b417be7
dev-lang/elixir: backport mksh fix
Reported-by: Maciej Barć
Fixed-by: Haelwenn Monnier
Closes: https://bugs.gentoo.org/729964
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
dev-lang/elixir/elixir-1.11.2.ebuild | 1 +
dev-lang/elixir/files/elixir-1.11.2-mksh.patch | 81 ++++++++++++++++++++++++++
2 files changed, 82 insertions(+)
diff --git a/dev-lang/elixir/elixir-1.11.2.ebuild b/dev-lang/elixir/elixir-1.11.2.ebuild
index 5d77e804b6c..00e05b4cf11 100644
--- a/dev-lang/elixir/elixir-1.11.2.ebuild
+++ b/dev-lang/elixir/elixir-1.11.2.ebuild
@@ -29,6 +29,7 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
"${FILESDIR}"/${PN}-1.10.3-no-Q.patch
"${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
+ "${FILESDIR}"/${PN}-1.11.2-mksh.patch
)
src_install() {
diff --git a/dev-lang/elixir/files/elixir-1.11.2-mksh.patch b/dev-lang/elixir/files/elixir-1.11.2-mksh.patch
new file mode 100644
index 00000000000..3fda4315689
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.11.2-mksh.patch
@@ -0,0 +1,81 @@
+From 69bb81635a77afb28419103bdb02867b48994d4a Mon Sep 17 00:00:00 2001
+From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
+Date: Wed, 9 Dec 2020 18:21:34 +0100
+Subject: [PATCH] bin/elixir: Rename erl() function to erl_set()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+It conflicted with the erl executable for Korn-derived shells where a function
+can be used in `exec command`.
+
+It isn't clear which behavior is expected from reading the POSIX specification
+but "Shell Command Language § 2.9.1 Simple Commands" clears the usage of
+the term `command` quite well.
+And even with excluding functions from the `command` operand of `exec`,
+why are aliases accepted? (in most if not all shells)
+
+See: https://bugs.gentoo.org/729964
+---
+ bin/elixir | 28 ++++++++++++++--------------
+ 1 file changed, 14 insertions(+), 14 deletions(-)
+
+--- a/bin/elixir
++++ b/bin/elixir
+@@ -70,7 +70,7 @@ readlink_f () {
+ ERL=""
+
+ # Stores erl arguments preserving spaces/quotes (mimics an array)
+-erl () {
++erl_set () {
+ eval "E${E}=\$1"
+ E=$((E + 1))
+ }
+@@ -137,34 +137,34 @@ while [ $I -le $LENGTH ]; do
+ ;;
+ --cookie)
+ S=2
+- erl "-setcookie"
+- erl "$2"
++ erl_set "-setcookie"
++ erl_set "$2"
+ ;;
+ --sname|--name)
+ S=2
+- erl "$(echo "$1" | cut -c 2-)"
+- erl "$2"
++ erl_set "$(echo "$1" | cut -c 2-)"
++ erl_set "$2"
+ ;;
+ --erl-config)
+ S=2
+- erl "-config"
+- erl "$2"
++ erl_set "-config"
++ erl_set "$2"
+ ;;
+ --vm-args)
+ S=2
+- erl "-args_file"
+- erl "$2"
++ erl_set "-args_file"
++ erl_set "$2"
+ ;;
+ --boot)
+ S=2
+- erl "-boot"
+- erl "$2"
++ erl_set "-boot"
++ erl_set "$2"
+ ;;
+ --boot-var)
+ S=3
+- erl "-boot_var"
+- erl "$2"
+- erl "$3"
++ erl_set "-boot_var"
++ erl_set "$2"
++ erl_set "$3"
+ ;;
+ --pipe-to)
+ S=3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/elixir/, dev-lang/elixir/files/
@ 2021-11-22 14:03 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2021-11-22 14:03 UTC (permalink / raw
To: gentoo-commits
commit: 0d99596c0a071d08e4415e21d2111aae62f6b1e5
Author: Jan Smutny <js <AT> excello <DOT> cz>
AuthorDate: Sat Oct 30 19:08:55 2021 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 14:03:38 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d99596c
dev-lang/elixir: revision bump of 1.11.4 to r1
Add patches for compatibility with OPT-24.
Update 1.11.4 DEPEND - block >=OTP-24 because of incompatibility.
Signed-off-by: Jan Smutný <smutnja3 <AT> gmail.com>
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
...lixir-1.11.4.ebuild => elixir-1.11.4-r1.ebuild} | 3 +
dev-lang/elixir/elixir-1.11.4.ebuild | 1 +
.../files/elixir-1.11.4-fix-elixir-test.patch | 33 ++++++
...4-fix-logger-translator-with-otp-24-11222.patch | 64 +++++++++++
...11.4-update-warnings-for-OTP-master-10807.patch | 125 +++++++++++++++++++++
5 files changed, 226 insertions(+)
diff --git a/dev-lang/elixir/elixir-1.11.4.ebuild b/dev-lang/elixir/elixir-1.11.4-r1.ebuild
similarity index 84%
copy from dev-lang/elixir/elixir-1.11.4.ebuild
copy to dev-lang/elixir/elixir-1.11.4-r1.ebuild
index cdae3d8bbe4b..f9c33ae96695 100644
--- a/dev-lang/elixir/elixir-1.11.4.ebuild
+++ b/dev-lang/elixir/elixir-1.11.4-r1.ebuild
@@ -30,6 +30,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-1.10.3-no-Q.patch
"${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
"${FILESDIR}"/${PN}-1.11.2-mksh.patch
+ "${FILESDIR}"/${P}-fix-elixir-test.patch
+ "${FILESDIR}"/${P}-update-warnings-for-OTP-master-10807.patch
+ "${FILESDIR}"/${P}-fix-logger-translator-with-otp-24-11222.patch
)
src_install() {
diff --git a/dev-lang/elixir/elixir-1.11.4.ebuild b/dev-lang/elixir/elixir-1.11.4.ebuild
index cdae3d8bbe4b..f5439a725a0a 100644
--- a/dev-lang/elixir/elixir-1.11.4.ebuild
+++ b/dev-lang/elixir/elixir-1.11.4.ebuild
@@ -16,6 +16,7 @@ RESTRICT="!test? ( test )"
DEPEND="
>=dev-lang/erlang-21:0=[ssl]
+ <dev-lang/erlang-24
"
# 'mix' tool collides with sci-biology/phylip, bug #537514
RDEPEND="${DEPEND}
diff --git a/dev-lang/elixir/files/elixir-1.11.4-fix-elixir-test.patch b/dev-lang/elixir/files/elixir-1.11.4-fix-elixir-test.patch
new file mode 100644
index 000000000000..6b4dd0c3939b
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.11.4-fix-elixir-test.patch
@@ -0,0 +1,33 @@
+From 3e88b1f336f843378790802bd486f6793b7ef872 Mon Sep 17 00:00:00 2001
+From: Jan Smutny <js@excello.cz>
+Date: Thu, 14 Oct 2021 16:14:55 +0200
+Subject: [PATCH] Fix elixir test assertion for erlang >=OTP-24.1
+
+---
+ lib/elixir/test/elixir/exception_test.exs | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/lib/elixir/test/elixir/exception_test.exs b/lib/elixir/test/elixir/exception_test.exs
+index df9d46bbc..ae08d5185 100644
+--- a/lib/elixir/test/elixir/exception_test.exs
++++ b/lib/elixir/test/elixir/exception_test.exs
+@@ -446,11 +446,12 @@ test "annotates undefined function error with suggestions" do
+ * min/1
+ """
+
+- assert blame_message(:erlang, & &1.gt_cookie()) == """
+- function :erlang.gt_cookie/0 is undefined or private. Did you mean one of:
++ assert blame_message(:erlang, & &1.hal()) == """
++ function :erlang.hal/0 is undefined or private. Did you mean one of:
+
+- * get_cookie/0
+- * set_cookie/2
++ * halt/0
++ * halt/1
++ * halt/2
+ """
+ end
+
+--
+2.31.1
+
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
new file mode 100644
index 000000000000..428e7ceb3ab4
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.11.4-fix-logger-translator-with-otp-24-11222.patch
@@ -0,0 +1,64 @@
+From b1492cb0cfa689c4c098761a375d5cb728d3c175 Mon Sep 17 00:00:00 2001
+From: Matteo <mbrancaleoni@gmail.com>
+Date: Tue, 31 Aug 2021 23:46:27 +0200
+Subject: [PATCH 3/3] Fix logger translator with otp-24 (#11222)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+* Handle new significant key in sasl reports
+
+* Add OTP-24.0 to CI matrix
+
+Co-authored-by: José Valim <jose.valim@dashbit.co>
+---
+ .github/workflows/ci.yml | 2 +-
+ lib/logger/lib/logger/translator.ex | 13 ++++++++++---
+ 2 files changed, 11 insertions(+), 4 deletions(-)
+
+diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
+index f43a9ff62..a4bc8dbeb 100644
+--- a/.github/workflows/ci.yml
++++ b/.github/workflows/ci.yml
+@@ -15,7 +15,7 @@ jobs:
+ strategy:
+ fail-fast: false
+ matrix:
+- otp_release: ['OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0']
++ otp_release: ['OTP-24.0', 'OTP-23.0', 'OTP-22.3', 'OTP-22.0', 'OTP-21.3.8', 'OTP-21.0']
+ development: [false]
+ include:
+ - otp_release: master
+diff --git a/lib/logger/lib/logger/translator.ex b/lib/logger/lib/logger/translator.ex
+index d1d7e62f1..8afd79436 100644
+--- a/lib/logger/lib/logger/translator.ex
++++ b/lib/logger/lib/logger/translator.ex
+@@ -357,15 +357,22 @@ defp child_info(_min_level, _child) do
+ []
+ end
+
+- defp child_debug(:debug, restart_type: restart, shutdown: shutdown, child_type: type) do
+- ["\nRestart: ", inspect(restart), "\nShutdown: ", inspect(shutdown)] ++
+- ["\nType: ", inspect(type)]
++ defp child_debug(:debug, opts) do
++ for {key, value} <- opts do
++ child_debug_key(key, value)
++ end
+ end
+
+ defp child_debug(_min_level, _child) do
+ []
+ end
+
++ defp child_debug_key(:restart_type, value), do: ["\nRestart: " | inspect(value)]
++ defp child_debug_key(:shutdown, value), do: ["\nShutdown: " | inspect(value)]
++ defp child_debug_key(:child_type, value), do: ["\nType: " | inspect(value)]
++ defp child_debug_key(:significant, value), do: if(value, do: "\nSignificant: true", else: [])
++ defp child_debug_key(_, _), do: []
++
+ defp report_crash(min_level, [[{:initial_call, initial_call} | crashed], linked]) do
+ mfa = initial_call_to_mfa(initial_call)
+ report_crash(min_level, crashed, [{:initial_call, mfa}], linked)
+--
+2.31.1
+
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
new file mode 100644
index 000000000000..2cc0b217cbb1
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.11.4-update-warnings-for-OTP-master-10807.patch
@@ -0,0 +1,125 @@
+From 237a71311c5ae4fc5dd3c7a590a7b6dab97a664a Mon Sep 17 00:00:00 2001
+From: Wojtek Mach <wojtekmach@users.noreply.github.com>
+Date: Tue, 23 Mar 2021 17:40:04 +0100
+Subject: [PATCH 2/3] Update warnings for OTP master (#10807)
+
+---
+ lib/elixir/src/elixir_erl_compiler.erl | 34 ++++++++++++-------
+ .../test/elixir/kernel/warning_test.exs | 25 --------------
+ 2 files changed, 21 insertions(+), 38 deletions(-)
+
+diff --git a/lib/elixir/src/elixir_erl_compiler.erl b/lib/elixir/src/elixir_erl_compiler.erl
+index 7010b59fd..e0aa05114 100644
+--- a/lib/elixir/src/elixir_erl_compiler.erl
++++ b/lib/elixir/src/elixir_erl_compiler.erl
+@@ -94,6 +94,8 @@ handle_file_warning(true, _File, {_Line, sys_core_fold, {nomatch_shadow, _}}) ->
+
+ %% Those we implement ourselves
+ handle_file_warning(_, _File, {_Line, v3_core, {map_key_repeated, _}}) -> ok;
++handle_file_warning(_, _File, {_Line, sys_core_fold, {ignored, useless_building}}) -> ok;
++%% TODO: remove when we require Erlang/OTP 24
+ handle_file_warning(_, _File, {_Line, sys_core_fold, useless_building}) -> ok;
+
+ %% Ignore all linting errors (only come up on parse transforms)
+@@ -112,11 +114,11 @@ handle_file_error(File, {Line, Module, Desc}) ->
+ elixir_errors:compile_error([{line, Line}], File, Message).
+
+ %% Mention the capture operator in make_fun
+-custom_format(sys_core_fold, {no_effect, {erlang, make_fun, 3}}) ->
++custom_format(sys_core_fold, {ignored, {no_effect, {erlang, make_fun, 3}}}) ->
+ "the result of the capture operator & (:erlang.make_fun/3) is never used";
+
+ %% Make no_effect clauses pretty
+-custom_format(sys_core_fold, {no_effect, {erlang, F, A}}) ->
++custom_format(sys_core_fold, {ignored, {no_effect, {erlang, F, A}}}) ->
+ {Fmt, Args} = case erl_internal:comp_op(F, A) of
+ true -> {"use of operator ~ts has no effect", [elixir_utils:erlang_comparison_op_to_elixir(F)]};
+ false ->
+@@ -127,12 +129,20 @@ custom_format(sys_core_fold, {no_effect, {erlang, F, A}}) ->
+ end,
+ io_lib:format(Fmt, Args);
+
+-%% Rewrite nomatch_guard to be more generic it can happen inside if, unless, and the like
+-custom_format(sys_core_fold, nomatch_guard) ->
++%% Rewrite nomatch to be more generic, it can happen inside if, unless, and the like
++custom_format(sys_core_fold, {nomatch, X}) when X == guard; X == no_clause ->
+ "this check/guard will always yield the same result";
+
++custom_format(sys_core_fold, {nomatch, {shadow, Line, {ErlName, ErlArity}}}) ->
++ {Name, Arity} = elixir_utils:erl_fa_to_elixir_fa(ErlName, ErlArity),
++
++ io_lib:format(
++ "this clause for ~ts/~B cannot match because a previous clause at line ~B always matches",
++ [Name, Arity, Line]
++ );
++
+ %% Handle literal eval failures
+-custom_format(sys_core_fold, {eval_failure, {Mod, Name, Arity}, Error}) ->
++custom_format(sys_core_fold, {failed, {eval_failure, {Mod, Name, Arity}, Error}}) ->
+ #{'__struct__' := Struct} = 'Elixir.Exception':normalize(error, Error),
+ {ExMod, ExName, ExArgs} = elixir_rewrite:erl_to_ex(Mod, Name, lists:duplicate(Arity, nil)),
+ Call = 'Elixir.Exception':format_mfa(ExMod, ExName, length(ExArgs)),
+@@ -143,18 +153,16 @@ custom_format(sys_core_fold, {eval_failure, {Mod, Name, Arity}, Error}) ->
+ ["the call to ", Trimmed, " will fail with ", elixir_aliases:inspect(Struct)];
+
+ %% TODO: remove when we require OTP 24
++custom_format(sys_core_fold, {nomatch_shadow, Line, FA}) ->
++ custom_format(sys_core_fold, {nomatch, {shadow, Line, FA}});
++custom_format(sys_core_fold, nomatch_guard) ->
++ custom_format(sys_core_fold, {nomatch, guard});
++custom_format(sys_core_fold, {no_effect, X}) ->
++ custom_format(sys_core_fold, {ignored, {no_effect, X}});
+ custom_format(sys_core_fold, {eval_failure, Error}) ->
+ #{'__struct__' := Struct} = 'Elixir.Exception':normalize(error, Error),
+ ["this expression will fail with ", elixir_aliases:inspect(Struct)];
+
+-custom_format(sys_core_fold, {nomatch_shadow,Line,{ErlName,ErlArity}}) ->
+- {Name, Arity} = elixir_utils:erl_fa_to_elixir_fa(ErlName, ErlArity),
+-
+- io_lib:format(
+- "this clause for ~ts/~B cannot match because a previous clause at line ~B always matches",
+- [Name, Arity, Line]
+- );
+-
+ custom_format([], Desc) ->
+ io_lib:format("~p", [Desc]);
+
+diff --git a/lib/elixir/test/elixir/kernel/warning_test.exs b/lib/elixir/test/elixir/kernel/warning_test.exs
+index 15a984a54..37334ff65 100644
+--- a/lib/elixir/test/elixir/kernel/warning_test.exs
++++ b/lib/elixir/test/elixir/kernel/warning_test.exs
+@@ -1154,31 +1154,6 @@ def foo(x), do: :ok
+ purge(Sample)
+ end
+
+- test "with and do clauses emit errors, else clauses do not" do
+- assert capture_err(fn ->
+- Code.compile_string("""
+- with {:first, int} when is_integer(int) <- {:second, Integer.gcd(2, 4)} do
+- int
+- end
+- """)
+- end) =~ "this clause cannot match"
+-
+- assert capture_err(fn ->
+- Code.compile_string("""
+- with {:first, int1} when is_integer(int1) <- {:first, Integer.gcd(2, 4)},
+- {:second, int2} when is_integer(int2) <- {:second, Integer.gcd(2, 4)} do
+- {:ok, int1 + int2}
+- else
+- {:first, nil} -> {:error, "first number is not integer"}
+- {:second, nil} -> {:error, "second number is not integer"}
+- end
+- """)
+- end) == ""
+- after
+- purge(Sample1)
+- purge(Sample2)
+- end
+-
+ test "warning on code point escape" do
+ assert capture_err(fn ->
+ Code.eval_string("? ")
+--
+2.31.1
+
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/elixir/, dev-lang/elixir/files/
@ 2024-03-29 7:51 Joonas Niilola
0 siblings, 0 replies; 4+ messages in thread
From: Joonas Niilola @ 2024-03-29 7:51 UTC (permalink / raw
To: gentoo-commits
commit: 8c02c0d8649c6385b1f9087c659944e5b2b488fa
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Fri Feb 23 07:43:54 2024 +0000
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
CommitDate: Fri Mar 29 07:50:57 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c02c0d8
dev-lang/elixir: 1.14.5: Fix tests for erlang-26.1+
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>
Closes: https://github.com/gentoo/gentoo/pull/35496
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
dev-lang/elixir/elixir-1.14.5-r2.ebuild | 41 ++++++++
.../elixir/files/elixir-1.14.5-otp26-tests.patch | 107 +++++++++++++++++++++
2 files changed, 148 insertions(+)
diff --git a/dev-lang/elixir/elixir-1.14.5-r2.ebuild b/dev-lang/elixir/elixir-1.14.5-r2.ebuild
new file mode 100644
index 000000000000..77baef256235
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.14.5-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~riscv ~sparc ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+# https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
+DEPEND="
+ >=dev-lang/erlang-23:0=[ssl]
+ <dev-lang/erlang-27
+"
+# 'mix' tool collides with sci-biology/phylip, bug #537514
+RDEPEND="${DEPEND}
+ !!sci-biology/phylip
+"
+DEPEND+="
+ test? ( dev-vcs/git )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
+ "${FILESDIR}"/${PN}-1.10.3-no-Q.patch
+ "${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
+ "${FILESDIR}"/${PN}-1.14.1-make44-parallel-build.patch
+ "${FILESDIR}"/${PN}-1.14.5-otp26-tests.patch
+)
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/files/elixir-1.14.5-otp26-tests.patch b/dev-lang/elixir/files/elixir-1.14.5-otp26-tests.patch
new file mode 100644
index 000000000000..4e554cda252a
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.14.5-otp26-tests.patch
@@ -0,0 +1,107 @@
+Grabbed as-is from https://github.com/elixir-lang/elixir/commit/54516c5684daa3af7f15477c77fae39e8d0c6482 which was done for 1.15.x
+
+From 54516c5684daa3af7f15477c77fae39e8d0c6482 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co>
+Date: Sun, 1 Oct 2023 15:46:17 +0200
+Subject: [PATCH] Address tests on Erlang/OTP 26.1, closes #12975
+
+---
+ lib/ex_unit/lib/ex_unit/callbacks.ex | 9 +-----
+ lib/ex_unit/test/ex_unit/formatter_test.exs | 31 +++++++++-----------
+ lib/ex_unit/test/ex_unit/supervised_test.exs | 11 ++-----
+ 3 files changed, 18 insertions(+), 33 deletions(-)
+
+diff --git a/lib/ex_unit/lib/ex_unit/callbacks.ex b/lib/ex_unit/lib/ex_unit/callbacks.ex
+index 060d207516a..2dbe9bd0e4a 100644
+--- a/lib/ex_unit/lib/ex_unit/callbacks.ex
++++ b/lib/ex_unit/lib/ex_unit/callbacks.ex
+@@ -549,14 +549,7 @@ defmodule ExUnit.Callbacks do
+ end
+
+ child_spec = Supervisor.child_spec(child_spec_or_module, opts)
+-
+- case Supervisor.start_child(sup, child_spec) do
+- {:error, {:already_started, _pid}} ->
+- {:error, {:duplicate_child_name, child_spec.id}}
+-
+- other ->
+- other
+- end
++ Supervisor.start_child(sup, child_spec)
+ end
+
+ @doc """
+diff --git a/lib/ex_unit/test/ex_unit/formatter_test.exs b/lib/ex_unit/test/ex_unit/formatter_test.exs
+index afb66a52436..bb9642fbcc4 100644
+--- a/lib/ex_unit/test/ex_unit/formatter_test.exs
++++ b/lib/ex_unit/test/ex_unit/formatter_test.exs
+@@ -491,28 +491,25 @@ defmodule ExUnit.FormatterTest do
+ test "inspect failure" do
+ failure = [{:error, catch_assertion(assert :will_fail == %BadInspect{}), []}]
+
+- message = ~S'''
+- got FunctionClauseError with message:
+-
+- """
+- no function clause matching in Inspect.ExUnit.FormatterTest.BadInspect.inspect/2
+- """
+-
+- while inspecting:
+-
+- %{__struct__: ExUnit.FormatterTest.BadInspect, key: 0}
+-
+- Stacktrace:
+- '''
+-
+- assert format_test_failure(test(), failure, 1, 80, &formatter/2) =~ """
++ assert format_test_failure(test(), failure, 1, 80, &formatter/2) =~ ~s'''
+ 1) world (Hello)
+ test/ex_unit/formatter_test.exs:1
+ Assertion with == failed
+ code: assert :will_fail == %BadInspect{}
+ left: :will_fail
+- right: #Inspect.Error<\n#{message}\
+- """
++ right: #Inspect.Error<
++ got FunctionClauseError with message:
++
++ """
++ no function clause matching in Inspect.ExUnit.FormatterTest.BadInspect.inspect/2
++ """
++
++ while inspecting:
++
++ #{inspect(%BadInspect{}, structs: false)}
++
++ Stacktrace:
++ '''
+ end
+
+ defmodule BadMessage do
+diff --git a/lib/ex_unit/test/ex_unit/supervised_test.exs b/lib/ex_unit/test/ex_unit/supervised_test.exs
+index 577ae6b9676..a02dfe3c0c5 100644
+--- a/lib/ex_unit/test/ex_unit/supervised_test.exs
++++ b/lib/ex_unit/test/ex_unit/supervised_test.exs
+@@ -73,19 +73,14 @@ defmodule ExUnit.SupervisedTest do
+
+ test "starts a supervised process with ID checks" do
+ {:ok, pid} = start_supervised({MyAgent, 0})
++ assert is_pid(pid)
+
+- assert {:error, {:duplicate_child_name, ExUnit.SupervisedTest.MyAgent}} =
+- start_supervised({MyAgent, 0})
+-
+- assert {:error, {{:already_started, ^pid}, _}} = start_supervised({MyAgent, 0}, id: :another)
++ assert {:error, _} = start_supervised({MyAgent, 0})
++ assert {:error, _} = start_supervised({MyAgent, 0}, id: :another)
+
+ assert_raise RuntimeError, ~r"Reason: bad child specification", fn ->
+ start_supervised!(%{id: 1, start: :oops})
+ end
+-
+- assert_raise RuntimeError, ~r"Reason: already started", fn ->
+- start_supervised!({MyAgent, 0}, id: :another)
+- end
+ end
+
+ test "stops a supervised process" do
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-lang/elixir/, dev-lang/elixir/files/
@ 2024-04-14 19:14 Petr Vaněk
0 siblings, 0 replies; 4+ messages in thread
From: Petr Vaněk @ 2024-04-14 19:14 UTC (permalink / raw
To: gentoo-commits
commit: 8006dc80dedd08b1c460cfd6623d3384811b05e5
Author: Haelwenn (lanodan) Monnier <contact <AT> hacktivis <DOT> me>
AuthorDate: Sun Mar 10 18:09:24 2024 +0000
Commit: Petr Vaněk <arkamar <AT> gentoo <DOT> org>
CommitDate: Sun Apr 14 19:14:05 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8006dc80
dev-lang/elixir: add 1.16.2
Includes the following upstream patch to skip tests relying on erlang[doc]:
https://github.com/elixir-lang/elixir/commit/c50863615c0e8ac957e22ae01a6f9af23978c3f9
Closes: https://bugs.gentoo.org/925670
Signed-off-by: Haelwenn (lanodan) Monnier <contact <AT> hacktivis.me>
Signed-off-by: Petr Vaněk <arkamar <AT> gentoo.org>
dev-lang/elixir/Manifest | 1 +
dev-lang/elixir/elixir-1.16.2.ebuild | 40 ++++++++++
...r-1.16.1-skip-tests-requiring-erlang-docs.patch | 90 ++++++++++++++++++++++
3 files changed, 131 insertions(+)
diff --git a/dev-lang/elixir/Manifest b/dev-lang/elixir/Manifest
index 09551eae2f03..0ccda30b1dce 100644
--- a/dev-lang/elixir/Manifest
+++ b/dev-lang/elixir/Manifest
@@ -4,3 +4,4 @@ DIST elixir-1.14.5.tar.gz 3076366 BLAKE2B cf1487c269b4f09c5a7771339782ddc5f6dc2d
DIST elixir-1.15.6.tar.gz 3150339 BLAKE2B c42571f0482add17d7b03c55ca0721569c5c54026b89d49c6d868410d817b348c1d82f615ecc084f7f8fe87633b3050e0f87c78184eb201fca1ceae939a605c7 SHA512 f41ada8b54faa8b070ad26b3cf05dd40fd66f952c1945c869d925f14f036f245341d0857815f58ba69acb7a519c06a5c2c166d41a6f637f1d0027d35b828e960
DIST elixir-1.15.7.tar.gz 3151775 BLAKE2B 62dc5e390f7b704fdab2be91b36faabc62aed097ec1a077476fee0e50717cfe527322d8eaf2afd90035bf1b4fb48803112ef4c7fded20f133b64cea3bee43c6d SHA512 a46f0569cbff342f15a04776f8d57cf2554867546004adabd9b9dff36c184ec56a78f2df2fc6c0855e65c11277662f694f5e6a8c6e1716cf4e22d8fdd5e1d4ae
DIST elixir-1.16.1.tar.gz 3353282 BLAKE2B 795c8778fb5d5d29e2c1b85d1ad2d9c0c96418010c69e692dc0bcb44ffb4a22e4a67489d991717c548eb3f9ea7173ff71d73a055543f477cf1460b1282259f58 SHA512 2663c04ab3abe577884535e681989610131be0f4f0e55997956b9d4cb87c1a3c0cfd3bf453cf61dbc66f3aa20cdf46bc683df1bfe9292771b5445c164e5197ce
+DIST elixir-1.16.2.tar.gz 3357093 BLAKE2B 61ba738542d33e827f7352b7f0a27aa76fc06f037d35c56efd96be1c26e28be90b6f2998cd2cac0090e5da771f6c45ad12d68644e36a214de36c9e26d4ac9686 SHA512 1e90adcd5d0512d4b394276e431f3987fc61a3f6191cd5c1d0f7fdd82baba99747aa553a3583e0813ffb5a48a32ce02a24e27b641f86a61e421722a802a850c1
diff --git a/dev-lang/elixir/elixir-1.16.2.ebuild b/dev-lang/elixir/elixir-1.16.2.ebuild
new file mode 100644
index 000000000000..429d175339cf
--- /dev/null
+++ b/dev-lang/elixir/elixir-1.16.2.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Elixir programming language"
+HOMEPAGE="https://elixir-lang.org"
+SRC_URI="https://github.com/elixir-lang/elixir/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 ErlPL-1.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc ~riscv ~sparc ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+# https://hexdocs.pm/elixir/compatibility-and-deprecations.html#between-elixir-and-erlang-otp
+DEPEND="
+ >=dev-lang/erlang-24:0=[ssl]
+ <dev-lang/erlang-27
+"
+# 'mix' tool collides with sci-biology/phylip, bug #537514
+RDEPEND="${DEPEND}
+ !!sci-biology/phylip
+"
+DEPEND+="
+ test? ( dev-vcs/git )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.9.1-disable-network-tests.patch
+ "${FILESDIR}"/${PN}-1.10.3-no-Q.patch
+ "${FILESDIR}"/${PN}-1.10.3-epmd-daemon.patch
+ "${FILESDIR}"/${PN}-1.16.1-skip-tests-requiring-erlang-docs.patch
+)
+
+src_install() {
+ emake DESTDIR="${D}" LIBDIR="$(get_libdir)" PREFIX="${EPREFIX}/usr" install
+ dodoc README.md CHANGELOG.md CODE_OF_CONDUCT.md
+}
diff --git a/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch b/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch
new file mode 100644
index 000000000000..187c45a7d902
--- /dev/null
+++ b/dev-lang/elixir/files/elixir-1.16.1-skip-tests-requiring-erlang-docs.patch
@@ -0,0 +1,90 @@
+Upstream-Commit: https://github.com/elixir-lang/elixir/commit/c50863615c0e8ac957e22ae01a6f9af23978c3f9
+
+From c50863615c0e8ac957e22ae01a6f9af23978c3f9 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@dashbit.co>
+Date: Thu, 8 Feb 2024 08:08:03 +0100
+Subject: [PATCH] Skip tests if Erlang was compiled without docs, closes #13322
+
+---
+ lib/iex/test/iex/helpers_test.exs | 12 +++++++++---
+ lib/iex/test/test_helper.exs | 10 +++++++++-
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/lib/iex/test/iex/helpers_test.exs b/lib/iex/test/iex/helpers_test.exs
+index 54f946516ce..171acc72abc 100644
+--- a/lib/iex/test/iex/helpers_test.exs
++++ b/lib/iex/test/iex/helpers_test.exs
+@@ -332,17 +332,20 @@ defmodule IEx.HelpersTest do
+ assert help =~ "Welcome to Interactive Elixir"
+ end
+
++ @tag :erlang_doc
+ test "prints Erlang module documentation" do
+ captured = capture_io(fn -> h(:timer) end)
+ assert captured =~ "This module provides useful functions related to time."
+ end
+
++ @tag :erlang_doc
+ test "prints Erlang module function specs" do
+ captured = capture_io(fn -> h(:timer.sleep() / 1) end)
+ assert captured =~ ":timer.sleep/1"
+ assert captured =~ "-spec sleep(Time) -> ok when Time :: timeout()."
+ end
+
++ @tag :erlang_doc
+ test "handles non-existing Erlang module function" do
+ captured = capture_io(fn -> h(:timer.baz() / 1) end)
+ assert captured =~ "No documentation for :timer.baz was found"
+@@ -1008,13 +1011,15 @@ defmodule IEx.HelpersTest do
+ cleanup_modules([TypeSample])
+ end
+
+- test "prints all types in erlang module" do
++ @tag :erlang_doc
++ test "prints all types in Erlang module" do
+ captured = capture_io(fn -> t(:queue) end)
+ assert captured =~ "-type queue() :: queue(_)"
+ assert captured =~ "-opaque queue(Item)"
+ end
+
+- test "prints single type from erlang module" do
++ @tag :erlang_doc
++ test "prints single type from Erlang module" do
+ captured = capture_io(fn -> t(:erlang.iovec()) end)
+ assert captured =~ "-type iovec() :: [binary()]"
+ assert captured =~ "A list of binaries."
+@@ -1024,7 +1029,8 @@ defmodule IEx.HelpersTest do
+ assert captured =~ "A list of binaries."
+ end
+
+- test "handles non-existing types from erlang module" do
++ @tag :erlang_doc
++ test "handles non-existing types from Erlang module" do
+ captured = capture_io(fn -> t(:erlang.foo()) end)
+ assert captured =~ "No type information for :erlang.foo was found or :erlang.foo is private"
+
+diff --git a/lib/iex/test/test_helper.exs b/lib/iex/test/test_helper.exs
+index f5a55f0aa80..b32c8be4e91 100644
+--- a/lib/iex/test/test_helper.exs
++++ b/lib/iex/test/test_helper.exs
+@@ -7,11 +7,19 @@ IEx.configure(colors: [enabled: false])
+ {line_exclude, line_include} =
+ if line = System.get_env("LINE"), do: {[:test], [line: line]}, else: {[], []}
+
++erlang_doc_exclude =
++ if match?({:docs_v1, _, _, _, _, _, _}, Code.fetch_docs(:array)) do
++ []
++ else
++ IO.puts("Erlang/OTP compiled without docs, some tests are excluded...")
++ [:erlang_doc]
++ end
++
+ ExUnit.start(
+ assert_receive_timeout: assert_timeout,
+ trace: !!System.get_env("TRACE"),
+ include: line_include,
+- exclude: line_exclude
++ exclude: line_exclude ++ erlang_doc_exclude
+ )
+
+ defmodule IEx.Case do
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-04-14 19:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-29 7:51 [gentoo-commits] repo/gentoo:master commit in: dev-lang/elixir/, dev-lang/elixir/files/ Joonas Niilola
-- strict thread matches above, loose matches on Subject: below --
2024-04-14 19:14 Petr Vaněk
2021-11-22 14:03 Joonas Niilola
2020-12-13 13:00 Sergei Trofimovich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox