diff options
-rw-r--r-- | community/elixir/APKBUILD | 5 | ||||
-rw-r--r-- | community/elixir/bit-comp-works.patch | 84 |
2 files changed, 2 insertions, 87 deletions
diff --git a/community/elixir/APKBUILD b/community/elixir/APKBUILD index db9e3f1168..043880f4a6 100644 --- a/community/elixir/APKBUILD +++ b/community/elixir/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Marlus Saraiva <marlus.saraiva@gmail.com> pkgname=elixir -pkgver=1.6.3 -pkgrel=1 +pkgver=1.6.4 +pkgrel=0 pkgdesc="Elixir is a dynamic, functional language designed for building scalable and maintainable applications" url="http://elixir-lang.org" arch="noarch" @@ -12,7 +12,6 @@ makedepends="erlang-crypto erlang-syntax-tools erlang-parsetools erlang-eunit er subpackages="$pkgname-doc" # TODO: remove disable-iex-tests.patch once elixir 1.7 is released, see https://github.com/elixir-lang/elixir/pull/7350 source="$pkgname-$pkgver.tar.gz::https://github.com/elixir-lang/elixir/archive/v$pkgver.tar.gz - bit-comp-works.patch disable-iex-tests.patch" builddir="$srcdir/$pkgname-$pkgver" diff --git a/community/elixir/bit-comp-works.patch b/community/elixir/bit-comp-works.patch deleted file mode 100644 index 6cda7edb0a..0000000000 --- a/community/elixir/bit-comp-works.patch +++ /dev/null @@ -1,84 +0,0 @@ -From 141c3276857ac09bb1f378ed6842495bb0b0e57d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim@gmail.com> -Date: Wed, 14 Mar 2018 21:45:13 +0100 -Subject: [PATCH] Ensure bitstring comprehensions work on OTP 20.3 (#7453) - -Closes #7452 ---- - lib/elixir/lib/collectable.ex | 3 +++ - lib/elixir/src/elixir_erl_for.erl | 24 +++++++++++++++++------- - 2 files changed, 20 insertions(+), 7 deletions(-) - -diff --git a/lib/elixir/lib/collectable.ex b/lib/elixir/lib/collectable.ex -index f7a35cd65e..495eb848cb 100644 ---- a/lib/elixir/lib/collectable.ex -+++ b/lib/elixir/lib/collectable.ex -@@ -101,6 +101,9 @@ defimpl Collectable, for: BitString do - acc, {:cont, x} when is_bitstring(x) -> - <<IO.iodata_to_binary(acc)::bitstring, x::bitstring>> - -+ acc, :done when is_bitstring(acc) -> -+ acc -+ - acc, :done -> - IO.iodata_to_binary(acc) - -diff --git a/lib/elixir/src/elixir_erl_for.erl b/lib/elixir/src/elixir_erl_for.erl -index e24da55a8b..5c4ce62c6d 100644 ---- a/lib/elixir/src/elixir_erl_for.erl -+++ b/lib/elixir/src/elixir_erl_for.erl -@@ -21,7 +21,7 @@ translate(Meta, Args, Return, S) -> - - case comprehension_expr(TInto, TExpr) of - {inline, TIntoExpr} -> -- {build_inline(Ann, TCases, TIntoExpr, TInto, TUniq, SF), SF}; -+ build_inline(Ann, TCases, TIntoExpr, TInto, TUniq, SF); - {into, TIntoExpr} -> - build_into(Ann, TCases, TIntoExpr, TInto, TUniq, SF) - end. -@@ -91,17 +91,17 @@ collect_filters([], Acc) -> - - build_inline(Ann, Clauses, Expr, Into, Uniq, S) -> - case not Uniq and lists:all(fun(Clause) -> element(1, Clause) == bin end, Clauses) of -- true -> build_comprehension(Ann, Clauses, Expr, Into); -+ true -> {build_comprehension(Ann, Clauses, Expr, Into), S}; - false -> build_inline_each(Ann, Clauses, Expr, Into, Uniq, S) - end. - - build_inline_each(Ann, Clauses, Expr, false, Uniq, S) -> - InnerFun = fun(InnerExpr, _InnerAcc) -> InnerExpr end, -- build_reduce(Ann, Clauses, InnerFun, Expr, {nil, Ann}, Uniq, S); -+ {build_reduce(Ann, Clauses, InnerFun, Expr, {nil, Ann}, Uniq, S), S}; - build_inline_each(Ann, Clauses, Expr, {nil, _} = Into, Uniq, S) -> - InnerFun = fun(InnerExpr, InnerAcc) -> {cons, Ann, InnerExpr, InnerAcc} end, - ReduceExpr = build_reduce(Ann, Clauses, InnerFun, Expr, Into, Uniq, S), -- elixir_erl:remote(Ann, lists, reverse, [ReduceExpr]); -+ {elixir_erl:remote(Ann, lists, reverse, [ReduceExpr]), S}; - build_inline_each(Ann, Clauses, Expr, {bin, _, []}, Uniq, S) -> - {InnerValue, SV} = build_var(Ann, S), - -@@ -135,11 +135,21 @@ build_inline_each(Ann, Clauses, Expr, {bin, _, []}, Uniq, S) -> - end, - - ReduceExpr = build_reduce(Ann, Clauses, InnerFun, Expr, {nil, Ann}, Uniq, SV), -- elixir_erl:remote(Ann, erlang, iolist_to_binary, [ReduceExpr]). -+ -+ {{'case', Ann, ReduceExpr, [ -+ {clause, Ann, -+ [InnerValue], -+ [[elixir_erl:remote(Ann, erlang, is_bitstring, [InnerValue])]], -+ [InnerValue]}, -+ {clause, Ann, -+ [InnerValue], -+ [], -+ [elixir_erl:remote(Ann, erlang, iolist_to_binary, [InnerValue])]} -+ ]}, SV}. - - build_into(Ann, Clauses, Expr, {map, _, []}, Uniq, S) -> -- ReduceExpr = build_inline_each(Ann, Clauses, Expr, {nil, Ann}, Uniq, S), -- {elixir_erl:remote(Ann, maps, from_list, [ReduceExpr]), S}; -+ {ReduceExpr, SR} = build_inline_each(Ann, Clauses, Expr, {nil, Ann}, Uniq, S), -+ {elixir_erl:remote(Ann, maps, from_list, [ReduceExpr]), SR}; - build_into(Ann, Clauses, Expr, Into, Uniq, S) -> - {Fun, SF} = build_var(Ann, S), - {Acc, SA} = build_var(Ann, SF), |