GNU bug report logs - #69999
[PATCH] gnu: elixir: Update to 1.16.2.

Previous Next

Package: guix-patches;

Reported by: Leo Nikkilä <hello <at> lnikki.la>

Date: Mon, 25 Mar 2024 17:08:02 UTC

Severity: normal

Tags: patch

Done: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 69999 in the body.
You can then email your comments to 69999 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#69999; Package guix-patches. (Mon, 25 Mar 2024 17:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Nikkilä <hello <at> lnikki.la>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 25 Mar 2024 17:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Nikkilä <hello <at> lnikki.la>
To: guix-patches <at> gnu.org
Cc: Leo Nikkilä <hello <at> lnikki.la>
Subject: [PATCH] gnu: elixir: Update to 1.16.2.
Date: Mon, 25 Mar 2024 19:05:51 +0200
* gnu/packages/patches/elixir-1.16-iex-tests.patch: New file.
* gnu/packages/elixir.scm (elixir): Update to 1.16.2. Add patch.
* gnu/local.mk (dist_patch_DATA): Register patch.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/elixir.scm                       | 10 ++-
 .../patches/elixir-1.16-iex-tests.patch       | 88 +++++++++++++++++++
 3 files changed, 96 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/elixir-1.16-iex-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 7f1006010b..e7a8298764 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1119,6 +1119,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/eigen-fix-strict-aliasing-bug.patch	\
   %D%/packages/patches/einstein-build.patch			\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
+  %D%/packages/patches/elixir-1.16-iex-tests.patch		\
   %D%/packages/patches/elixir-path-length.patch			\
   %D%/packages/patches/elm-ghc9.2.patch	\
   %D%/packages/patches/elm-offline-package-registry.patch	\
diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
index 2885ddbd61..6aace1c01e 100644
--- a/gnu/packages/elixir.scm
+++ b/gnu/packages/elixir.scm
@@ -9,6 +9,7 @@
 ;;; Copyright © 2021 Cees de Groot <cg <at> evrl.com>
 ;;; Copyright © 2024 Andrew Tropin <andrew <at> trop.in>
 ;;; Copyright © 2024 Ivan Sokolov <ivan-p-sokolov <at> ya.ru>
+;;; Copyright © 2024 Leo Nikkilä <hello <at> lnikki.la>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -39,7 +40,7 @@ (define-module (gnu packages elixir)
 (define-public elixir
   (package
     (name "elixir")
-    (version "1.14.0")
+    (version "1.16.2")
     (source
      (origin
        (method git-fetch)
@@ -48,8 +49,11 @@ (define-public elixir
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "16rc4qaykddda6ax5f8zw70yhapgwraqbgx5gp3f40dvfax3d51l"))
-       (patches (search-patches "elixir-path-length.patch"))))
+        (base32 "145lwbwpyj686rq3xkzg4i07v0z8x2j185aa2lvyj5ppzv2ihiim"))
+       (patches (search-patches "elixir-path-length.patch"
+                                ;; This patch has been merged and should
+                                ;; be included in the next version.
+                                "elixir-1.16-iex-tests.patch"))))
     (build-system gnu-build-system)
     (arguments
      (list
diff --git a/gnu/packages/patches/elixir-1.16-iex-tests.patch b/gnu/packages/patches/elixir-1.16-iex-tests.patch
new file mode 100644
index 0000000000..d190036764
--- /dev/null
+++ b/gnu/packages/patches/elixir-1.16-iex-tests.patch
@@ -0,0 +1,88 @@
+From d17df054e21795637d5d265e3e37c4791404e6b2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim <at> 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 18b19ddce56..56e8c014450 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
-- 
2.41.0





Information forwarded to guix-patches <at> gnu.org:
bug#69999; Package guix-patches. (Sat, 05 Oct 2024 17:55:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Zheng Junjie <zhengjunjie <at> iscas.ac.cn>
To: Leo Nikkilä via Guix-patches via <guix-patches <at> gnu.org>
Cc: Leo Nikkilä <hello <at> lnikki.la>, 69999-done <at> debbugs.gnu.org
Subject: Re: [bug#69999] [PATCH] gnu: elixir: Update to 1.16.2.
Date: Sun, 06 Oct 2024 01:53:41 +0800
[Message part 1 (text/plain, inline)]
Leo Nikkilä via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/patches/elixir-1.16-iex-tests.patch: New file.
> * gnu/packages/elixir.scm (elixir): Update to 1.16.2. Add patch.
> * gnu/local.mk (dist_patch_DATA): Register patch.
> ---
>  gnu/local.mk                                  |  1 +
>  gnu/packages/elixir.scm                       | 10 ++-
>  .../patches/elixir-1.16-iex-tests.patch       | 88 +++++++++++++++++++
>  3 files changed, 96 insertions(+), 3 deletions(-)
>  create mode 100644 gnu/packages/patches/elixir-1.16-iex-tests.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 7f1006010b..e7a8298764 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1119,6 +1119,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/eigen-fix-strict-aliasing-bug.patch	\
>    %D%/packages/patches/einstein-build.patch			\
>    %D%/packages/patches/elfutils-tests-ptrace.patch		\
> +  %D%/packages/patches/elixir-1.16-iex-tests.patch		\
>    %D%/packages/patches/elixir-path-length.patch			\
>    %D%/packages/patches/elm-ghc9.2.patch	\
>    %D%/packages/patches/elm-offline-package-registry.patch	\
> diff --git a/gnu/packages/elixir.scm b/gnu/packages/elixir.scm
> index 2885ddbd61..6aace1c01e 100644
> --- a/gnu/packages/elixir.scm
> +++ b/gnu/packages/elixir.scm
> @@ -9,6 +9,7 @@
>  ;;; Copyright © 2021 Cees de Groot <cg <at> evrl.com>
>  ;;; Copyright © 2024 Andrew Tropin <andrew <at> trop.in>
>  ;;; Copyright © 2024 Ivan Sokolov <ivan-p-sokolov <at> ya.ru>
> +;;; Copyright © 2024 Leo Nikkilä <hello <at> lnikki.la>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -39,7 +40,7 @@ (define-module (gnu packages elixir)
>  (define-public elixir
>    (package
>      (name "elixir")
> -    (version "1.14.0")
> +    (version "1.16.2")
>      (source
>       (origin
>         (method git-fetch)
> @@ -48,8 +49,11 @@ (define-public elixir
>               (commit (string-append "v" version))))
>         (file-name (git-file-name name version))
>         (sha256
> -        (base32 "16rc4qaykddda6ax5f8zw70yhapgwraqbgx5gp3f40dvfax3d51l"))
> -       (patches (search-patches "elixir-path-length.patch"))))
> +        (base32 "145lwbwpyj686rq3xkzg4i07v0z8x2j185aa2lvyj5ppzv2ihiim"))
> +       (patches (search-patches "elixir-path-length.patch"
> +                                ;; This patch has been merged and should
> +                                ;; be included in the next version.
> +                                "elixir-1.16-iex-tests.patch"))))
>      (build-system gnu-build-system)
>      (arguments
>       (list
> diff --git a/gnu/packages/patches/elixir-1.16-iex-tests.patch b/gnu/packages/patches/elixir-1.16-iex-tests.patch
> new file mode 100644
> index 0000000000..d190036764
> --- /dev/null
> +++ b/gnu/packages/patches/elixir-1.16-iex-tests.patch
> @@ -0,0 +1,88 @@
> +From d17df054e21795637d5d265e3e37c4791404e6b2 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Jos=C3=A9=20Valim?= <jose.valim <at> 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 18b19ddce56..56e8c014450 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

Sorry for missing patch.

now have elixir 1.17.3. close.
[signature.asc (application/pgp-signature, inline)]

Reply sent to Zheng Junjie <zhengjunjie <at> iscas.ac.cn>:
You have taken responsibility. (Sat, 05 Oct 2024 17:55:03 GMT) Full text and rfc822 format available.

Notification sent to Leo Nikkilä <hello <at> lnikki.la>:
bug acknowledged by developer. (Sat, 05 Oct 2024 17:55:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 03 Nov 2024 12:24:14 GMT) Full text and rfc822 format available.

This bug report was last modified 278 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.