Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-lang/elixir: drop 1.16.1, add 1.16.2 #35561

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-lang/elixir/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ DIST elixir-1.14.3.tar.gz 3086297 BLAKE2B b162ea35a762bc1e151c7844237f3167c97da9
DIST elixir-1.14.5.tar.gz 3076366 BLAKE2B cf1487c269b4f09c5a7771339782ddc5f6dc2d5f31bd098486824e1f50040462a55a6135e76a7d635461b8d61ce8ab45be2d1da86d60ecf0bc3c86c98b86531d SHA512 589482fb080eb9f71319b7927312ee255dab0376a8fb781533bc97b6a75dd71ec43cd022bb2eff12eca205cdeaf9a6d629f754c555c17cd6222e05912ff3d960
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
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,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.16.1-skip-tests-requiring-erlang-docs.patch
)

src_install() {
Expand Down
Original file line number Diff line number Diff line change
@@ -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