Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package elixir for openSUSE:Factory checked in at 2024-07-08 19:09:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/elixir (Old) and /work/SRC/openSUSE:Factory/.elixir.new.2080 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "elixir" Mon Jul 8 19:09:02 2024 rev:32 rq:1186125 version:1.17.2 Changes: -------- --- /work/SRC/openSUSE:Factory/elixir/elixir.changes 2024-06-19 16:41:26.407774837 +0200 +++ /work/SRC/openSUSE:Factory/.elixir.new.2080/elixir.changes 2024-07-08 19:09:28.213395125 +0200 @@ -1,0 +2,6 @@ +Sun Jul 7 09:23:37 UTC 2024 - Alessio Biancalana <alessio.biancal...@suse.com> + +- Upgrade to Elixir 1.17.2: + * Changelog available at https://hexdocs.pm/elixir/1.17.2/changelog.html + +------------------------------------------------------------------- Old: ---- elixir-1.17.1-doc.zip elixir-1.17.1.tar.gz New: ---- elixir-1.17.2-doc.zip elixir-1.17.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ elixir.spec ++++++ --- /var/tmp/diff_new_pack.IlnFtL/_old 2024-07-08 19:09:28.949422043 +0200 +++ /var/tmp/diff_new_pack.IlnFtL/_new 2024-07-08 19:09:28.953422189 +0200 @@ -19,7 +19,7 @@ %define elixirdir %{_prefix}/lib/elixir Name: elixir -Version: 1.17.1 +Version: 1.17.2 Release: 0 Summary: Functional meta-programming aware language built atop Erlang License: Apache-2.0 ++++++ elixir-1.17.1-doc.zip -> elixir-1.17.2-doc.zip ++++++ /work/SRC/openSUSE:Factory/elixir/elixir-1.17.1-doc.zip /work/SRC/openSUSE:Factory/.elixir.new.2080/elixir-1.17.2-doc.zip differ: char 11, line 1 ++++++ elixir-1.17.1.tar.gz -> elixir-1.17.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/CHANGELOG.md new/elixir-1.17.2/CHANGELOG.md --- old/elixir-1.17.1/CHANGELOG.md 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/CHANGELOG.md 2024-07-06 23:10:25.000000000 +0200 @@ -70,6 +70,20 @@ Process.send_after(pid, :wake_up, to_timeout(hour: 1)) ``` +## v1.17.2 (2024-07-06) + +### 1. Bug fixes + +#### Logger + + * [Logger.Translator] Fix logger crash when `:gen_statem`'s `format_status/2` returns non-tuple + +#### Mix + + * [mix deps.get] Fix regression when fetching a git repository with a `:ref` + * [mix release] Validate `RELEASE_MODE` and set ERRORLEVEL on `.bat` scripts + * [mix release] Fix invalid example in code comment inside the generated vm.args.eex + ## v1.17.1 (2024-06-18) ### 1. Enhancements @@ -161,6 +175,7 @@ * [Kernel] Avoid double tracing events when capturing a function * [Kernel] Fix a bug where captured arguments would conflict when a capture included a macro that also used captures * [Module] Return default value in `Module.get_attribute/3` for persisted attributes which have not yet been written to + * [String] Properly handle transpositions in `jaro_distance`. This will correct the distance result in certain cases #### IEx diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/VERSION new/elixir-1.17.2/VERSION --- old/elixir-1.17.1/VERSION 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/VERSION 2024-07-06 23:10:25.000000000 +0200 @@ -1 +1 @@ -1.17.1 +1.17.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/bin/elixir new/elixir-1.17.2/bin/elixir --- old/elixir-1.17.1/bin/elixir 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/bin/elixir 2024-07-06 23:10:25.000000000 +0200 @@ -1,7 +1,7 @@ #!/bin/sh set -e -ELIXIR_VERSION=1.17.1 +ELIXIR_VERSION=1.17.2 if [ $# -eq 0 ] || { [ $# -eq 1 ] && { [ "$1" = "--help" ] || [ "$1" = "-h" ]; }; }; then cat <<USAGE >&2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/bin/elixir.bat new/elixir-1.17.2/bin/elixir.bat --- old/elixir-1.17.1/bin/elixir.bat 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/bin/elixir.bat 2024-07-06 23:10:25.000000000 +0200 @@ -1,6 +1,6 @@ @echo off -set ELIXIR_VERSION=1.17.1 +set ELIXIR_VERSION=1.17.2 if ""%1""=="""" if ""%2""=="""" goto documentation if /I ""%1""==""--help"" if ""%2""=="""" goto documentation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/logger/lib/logger/translator.ex new/elixir-1.17.2/lib/logger/lib/logger/translator.ex --- old/elixir-1.17.1/lib/logger/lib/logger/translator.ex 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/logger/lib/logger/translator.ex 2024-07-06 23:10:25.000000000 +0200 @@ -298,7 +298,7 @@ client_info: client, name: name, reason: {kind, reason, stack}, - state: {state, data}, + state: state, queue: queue, postponed: postponed, callback_mode: callback_mode, @@ -328,8 +328,6 @@ msg, "\nState: ", inspect(state, inspect_opts), - "\nData: ", - inspect(data, inspect_opts), "\nCallback mode: ", "#{inspect(callback_mode, inspect_opts)}, state_enter: #{state_enter?}" | format_client_info(client) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/logger/test/logger/translator_test.exs new/elixir-1.17.2/lib/logger/test/logger/translator_test.exs --- old/elixir-1.17.1/lib/logger/test/logger/translator_test.exs 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/logger/test/logger/translator_test.exs 2024-07-06 23:10:25.000000000 +0200 @@ -100,6 +100,28 @@ end end + defmodule MyGenStatemHandleEvent do + @behaviour :gen_statem + + @impl true + def callback_mode, do: :handle_event_function + + @impl true + def init(state) do + {:ok, :no_state, state} + end + + @impl true + def handle_event({:call, _}, :error, :no_state, _data) do + raise "oops" + end + + @impl :gen_statem + def format_status(_opts, [_pdict, _, state]) do + state + end + end + defmodule MyBridge do @behaviour :supervisor_bridge @@ -393,7 +415,7 @@ assert {%RuntimeError{message: "oops"}, [_ | _]} = process_metadata[:crash_reason] refute Map.has_key?(gen_statem_metadata, :initial_call) - assert process_metadata[:initial_call] == {Logger.TranslatorTest.MyGenStatem, :init, 1} + assert process_metadata[:initial_call] == {MyGenStatem, :init, 1} refute Map.has_key?(gen_statem_metadata, :registered_name) refute Map.has_key?(process_metadata, :registered_name) @@ -445,7 +467,7 @@ assert capture_log(:debug, fn -> catch_exit(:gen_statem.call(pid, :error)) end) =~ """ - [:ok, :ok, :ok, ...] + State: {:started, [:ok, ...]} """ after Application.put_env(:logger, :translator_inspect_opts, []) @@ -462,8 +484,7 @@ .* Queue: .* Postponed: \[\] - State: :started - Data: :ok + State: {:started, :ok} Callback mode: :state_functions, state_enter: false Client #PID<\d+\.\d+\.\d+> is alive .* @@ -488,8 +509,7 @@ .* Queue: .* Postponed: \[\] - State: :started - Data: :ok + State: {:started, :ok} Callback mode: :state_functions, state_enter: false Client :named_client is alive .* @@ -513,8 +533,7 @@ .* Queue: .* Postponed: \[\] - State: :started - Data: :ok + State: {:started, :ok} Callback mode: :state_functions, state_enter: false Client #PID<\d+\.\d+\.\d+> is dead """s @@ -533,8 +552,7 @@ .* Queue: .* Postponed: \[\] - State: :started - Data: :ok + State: {:started, :ok} Callback mode: :state_functions, state_enter: false """s end @@ -552,6 +570,34 @@ assert_receive {:event, {:string, ["Process " | _]}, _process_metadata} end + test "translates :gen_statem crashes when callback_mode is :handle_event_function" do + {:ok, pid} = :gen_statem.start(MyGenStatemHandleEvent, :ok, []) + + assert capture_log(:debug, fn -> + catch_exit(:gen_statem.call(pid, :error)) + end) =~ ~r""" + \[error\] :gen_statem #PID<\d+\.\d+\.\d+> terminating + \*\* \(RuntimeError\) oops + .* + Queue: .* + Postponed: \[\] + State: :ok + Callback mode: .*, state_enter: false + """s + + assert_receive {:event, {:string, [[":gen_statem " <> _ | _] | _]}, gen_statem_metadata} + assert_receive {:event, {:string, ["Process " | _]}, process_metadata} + + assert {%RuntimeError{message: "oops"}, [_ | _]} = gen_statem_metadata[:crash_reason] + assert {%RuntimeError{message: "oops"}, [_ | _]} = process_metadata[:crash_reason] + + refute Map.has_key?(gen_statem_metadata, :initial_call) + assert process_metadata[:initial_call] == {MyGenStatemHandleEvent, :init, 1} + + refute Map.has_key?(gen_statem_metadata, :registered_name) + refute Map.has_key?(process_metadata, :registered_name) + end + test "translates Task crashes" do {:ok, pid} = Task.start_link(__MODULE__, :task, [self()]) parent = self() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/mix/lib/mix/scm/git.ex new/elixir-1.17.2/lib/mix/lib/mix/scm/git.ex --- old/elixir-1.17.1/lib/mix/lib/mix/scm/git.ex 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/mix/lib/mix/scm/git.ex 2024-07-06 23:10:25.000000000 +0200 @@ -9,7 +9,7 @@ @impl true def format(opts) do - if rev = get_opts_rev(opts) do + if rev = opts[:ref] || opts[:branch] || opts[:tag] do "#{redact_uri(opts[:git])} - #{rev}" else redact_uri(opts[:git]) @@ -22,7 +22,7 @@ {:git, _, lock_rev, lock_opts} -> lock = String.slice(lock_rev, 0, 7) - case Enum.find_value([:branch, :ref, :tag], &List.keyfind(lock_opts, &1, 0)) do + case Enum.find_value([:ref, :branch, :tag], &List.keyfind(lock_opts, &1, 0)) do {:ref, _} -> lock <> " (ref)" {key, val} -> lock <> " (#{key}: #{val})" nil -> lock @@ -125,18 +125,18 @@ sparse_toggle(opts) update_origin(opts[:git]) - rev = get_lock_rev(opts[:lock], opts) || get_opts_rev(opts) - # Fetch external data + branch_or_tag = opts[:branch] || opts[:tag] + ["--git-dir=.git", "fetch", "--force", "--quiet"] |> Kernel.++(progress_switch(git_version())) |> Kernel.++(tags_switch(opts[:tag])) |> Kernel.++(depth_switch(opts[:depth])) - |> Kernel.++(if rev, do: ["origin", rev], else: []) + |> Kernel.++(if branch_or_tag, do: ["origin", branch_or_tag], else: []) |> git!() # Migrate the Git repo - rev = rev || default_branch() + rev = get_lock_rev(opts[:lock], opts) || opts[:ref] || branch_or_tag || default_branch() git!(["--git-dir=.git", "checkout", "--quiet", rev]) if opts[:submodules] do @@ -250,18 +250,24 @@ end defp validate_depth(opts) do - case Keyword.take(opts, [:depth]) do - [] -> - opts + case Keyword.take(opts, [:depth, :ref]) do + [_, _] -> + Mix.raise( + "Cannot specify :depth and :ref at the same time. " <> + "Error on Git dependency: #{redact_uri(opts[:git])}" + ) - [{:depth, depth}] when is_integer(depth) and depth > 0 -> + [depth: depth] when is_integer(depth) and depth > 0 -> opts - invalid_depth -> + [depth: invalid_depth] -> Mix.raise( "The depth must be a positive integer, and be specified only once, got: #{inspect(invalid_depth)}. " <> "Error on Git dependency: #{redact_uri(opts[:git])}" ) + + _ -> + opts end end @@ -290,10 +296,6 @@ end end - defp get_opts_rev(opts) do - opts[:branch] || opts[:ref] || opts[:tag] - end - defp redact_uri(git) do case URI.parse(git) do %{userinfo: nil} -> git diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/mix/lib/mix/tasks/deps.ex new/elixir-1.17.2/lib/mix/lib/mix/tasks/deps.ex --- old/elixir-1.17.1/lib/mix/lib/mix/tasks/deps.ex 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/mix/lib/mix/tasks/deps.ex 2024-07-06 23:10:25.000000000 +0200 @@ -125,7 +125,8 @@ * `:depth` *(since v1.17.0)* - creates a shallow clone of the Git repository, limiting the history to the specified number of commits. This can significantly improve clone speed for large repositories when full history is not needed. - The value must be a positive integer, typically `1`. + The value must be a positive integer, typically `1`. Cannot be used with the + `:ref` option. If your Git repository requires authentication, such as basic username:password HTTP authentication via URLs, it can be achieved via Git configuration, keeping diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/mix/lib/mix/tasks/release.ex new/elixir-1.17.2/lib/mix/lib/mix/tasks/release.ex --- old/elixir-1.17.1/lib/mix/lib/mix/tasks/release.ex 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/mix/lib/mix/tasks/release.ex 2024-07-06 23:10:25.000000000 +0200 @@ -402,8 +402,8 @@ If you are setting this option manually, we recommend the cookie option to be a long and randomly generated string, such as: - `Base.url_encode64(:crypto.strong_rand_bytes(40))`. We also recommend to restrict - the characters in the cookie to the subset returned by `Base.url_encode64/1`. + `Base.encode32(:crypto.strong_rand_bytes(40))`. We also recommend restricting + the characters in the cookie to only alphanumeric characters and underscore. * `:validate_compile_env` - by default a release will match all runtime configuration against any configuration that was marked at compile time diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/mix/lib/mix/tasks/release.init.ex new/elixir-1.17.2/lib/mix/lib/mix/tasks/release.init.ex --- old/elixir-1.17.1/lib/mix/lib/mix/tasks/release.init.ex 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/mix/lib/mix/tasks/release.init.ex 2024-07-06 23:10:25.000000000 +0200 @@ -53,7 +53,7 @@ ## Enable deployment without epmd ## (requires changing both vm.args and remote.vm.args) - ##-start_epmd false -erl_epmd_port 6789#{remote? && " -dist_listen false"} + ##-start_epmd false -erl_epmd_port 6789#{if(remote?, do: " -dist_listen false")} """ @doc false @@ -136,7 +136,7 @@ ;; *) - echo "ERROR: Expected sname, name, or none in RELEASE_DISTRIBUTION, got: $RELEASE_DISTRIBUTION" >&2 + echo "ERROR: Expected RELEASE_DISTRIBUTION to be sname, name, or none, got: $RELEASE_DISTRIBUTION" >&2 exit 1 ;; esac @@ -280,7 +280,7 @@ rem set RELEASE_MODE=interactive rem Set the release to work across nodes. - rem RELEASE_DISTRIBUTION must be "sname" (local), "name" (distributed) or "none". + rem RELEASE_DISTRIBUTION must be sname (local), name (distributed) or none. rem set RELEASE_DISTRIBUTION=name rem set RELEASE_NODE=<%= @release.name %> """ @@ -314,13 +314,33 @@ if not defined RELEASE_BOOT_SCRIPT_CLEAN (set RELEASE_BOOT_SCRIPT_CLEAN=start_clean) if not defined RELEASE_SYS_CONFIG (set RELEASE_SYS_CONFIG=!REL_VSN_DIR!\sys) + if "!RELEASE_DISTRIBUTION!" == "none" ( + rem + ) else if "!RELEASE_DISTRIBUTION!" == "name" ( + rem + ) else if "!RELEASE_DISTRIBUTION!" == "sname" ( + rem + ) else ( + echo ERROR: Expected RELEASE_DISTRIBUTION to be sname, name, or none, got: !RELEASE_DISTRIBUTION! + exit /B 1 + ) + + if "!RELEASE_MODE!" == "embedded" ( + rem + ) else if "!RELEASE_MODE!" == "interactive" ( + rem + ) else ( + echo ERROR: Expected RELEASE_MODE to be embedded or interactive, got: !RELEASE_MODE! + exit /B 1 + ) + if "%~1" == "start" (set "REL_EXEC=elixir" && set "REL_EXTRA=--no-halt" && set "REL_GOTO=start") if "%~1" == "start_iex" (set "REL_EXEC=iex" && set "REL_EXTRA=--werl" && set "REL_GOTO=start") if "%~1" == "install" (set "REL_GOTO=install") if "%~1" == "eval" ( if "%~2" == "" ( echo ERROR: EVAL expects an expression as argument - goto end + exit /B 1 ) set "REL_GOTO=eval" ) @@ -348,7 +368,7 @@ if "%~1" == "rpc" ( if "%~2" == "" ( echo ERROR: RPC expects an expression as argument - goto end + exit /B 1 ) set "REL_RPC=%~2" goto rpc @@ -369,7 +389,10 @@ echo pid Prints the operating system PID of the running system via a remote command echo version Prints the release name and version to be booted echo. - if not "%~1" == "" (echo ERROR: Unknown command %~1) + if not "%~1" == "" ( + echo ERROR: Unknown command %~1 + exit /B 1 + ) goto end :start @@ -427,7 +450,7 @@ if "!RELEASE_DISTRIBUTION!" == "none" ( set RELEASE_DISTRIBUTION_FLAG= ) else ( - set RELEASE_DISTRIBUTION_FLAG=--!RELEASE_DISTRIBUTION! "rem-!RANDOM!-!RELEASE_NODE!" + set RELEASE_DISTRIBUTION_FLAG=--!RELEASE_DISTRIBUTION! "rpc-!RANDOM!-!RELEASE_NODE!" ) "!REL_VSN_DIR!\elixir.bat" ^ @@ -452,7 +475,7 @@ if "!RELEASE_DISTRIBUTION!" == "none" ( echo ERROR: RELEASE_DISTRIBUTION is required in install command - goto end + exit /B 1 ) "!ERLSRV!" add "!RELEASE_NAME!_!RELEASE_NAME!" ^ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/elixir-1.17.1/lib/mix/test/mix/tasks/deps.git_test.exs new/elixir-1.17.2/lib/mix/test/mix/tasks/deps.git_test.exs --- old/elixir-1.17.1/lib/mix/test/mix/tasks/deps.git_test.exs 2024-06-18 13:11:00.000000000 +0200 +++ new/elixir-1.17.2/lib/mix/test/mix/tasks/deps.git_test.exs 2024-07-06 23:10:25.000000000 +0200 @@ -530,43 +530,6 @@ end) end - test "with ref" do - [last, _ | _] = get_git_repo_revs("git_repo") - - Process.put(:git_repo_opts, depth: 1, ref: last) - - in_fixture("no_mixfile", fn -> - Mix.Project.push(GitApp) - - Mix.Tasks.Deps.Get.run([]) - message = "* Getting git_repo (#{fixture_path("git_repo")} - #{last})" - assert_received {:mix_shell, :info, [^message]} - assert_shallow("deps/git_repo", 1) - end) - end - - test "changing refspec updates retaining depth" do - [last, first | _] = get_git_repo_revs("git_repo") - - Process.put(:git_repo_opts, ref: first, depth: 1) - - in_fixture("no_mixfile", fn -> - Mix.Project.push(GitApp) - - Mix.Tasks.Deps.Get.run([]) - message = "* Getting git_repo (#{fixture_path("git_repo")} - #{first})" - assert_received {:mix_shell, :info, [^message]} - assert_shallow("deps/git_repo", 1) - assert File.read!("mix.lock") =~ first - - # Change refspec - update_dep(ref: last, depth: 1) - Mix.Tasks.Deps.Get.run([]) - assert_shallow("deps/git_repo", 1) - assert File.read!("mix.lock") =~ last - end) - end - test "removing depth retains shallow repository" do # For compatibility and simplicity, we follow Git's behavior and do not # attempt to unshallow an existing repository. This should not be a