From 96d30bb554c8cad7fbb19848f8f7bf379d00be66 Mon Sep 17 00:00:00 2001 From: akash-akya Date: Fri, 2 Feb 2024 21:20:34 +0530 Subject: [PATCH 1/2] Fix logger macro deprecation warning --- lib/vix/vips/image.ex | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/vix/vips/image.ex b/lib/vix/vips/image.ex index 94900b6..e35aec7 100644 --- a/lib/vix/vips/image.ex +++ b/lib/vix/vips/image.ex @@ -491,7 +491,7 @@ defmodule Vix.Vips.Image do IO.iodata_to_binary(iodata) rescue ArgumentError -> - Logger.warn("argument must be stream of iodata") + log_warn("argument must be stream of iodata") Vix.SourcePipe.stop(pipe) exit(:normal) end @@ -1200,4 +1200,10 @@ defmodule Vix.Vips.Image do defp binary_to_list(binary, :VIPS_FORMAT_DOUBLE) do for <>, do: band end + + if Kernel.macro_exported?(Logger, :warning, 1) do + def log_warn(msg), do: Logger.warning(msg) + else + def log_warn(msg), do: Logger.warn(msg) + end end From 68eacdd11c93d17bc2f9fbdf2db3a97beb5fc837 Mon Sep 17 00:00:00 2001 From: akash-akya Date: Fri, 2 Feb 2024 21:35:39 +0530 Subject: [PATCH 2/2] Update CI config to add newer Elixir versions --- .github/workflows/ci.yaml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b5d32ce..39e1b6b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,10 +11,6 @@ jobs: strategy: matrix: include: - - elixir: 1.7.x - otp: 22.x - - elixir: 1.8.x - otp: 22.x - elixir: 1.9.x otp: 22.x - elixir: 1.10.x @@ -25,10 +21,12 @@ jobs: otp: 23.x - elixir: 1.13.x otp: 24.x - - elixir: 1.14.x - otp: 24.x - elixir: 1.14.x otp: 25.x + - elixir: 1.15.x + otp: 26.x + - elixir: 1.16.x + otp: 26.x steps: - uses: erlef/setup-beam@v1 with: @@ -94,8 +92,8 @@ jobs: strategy: matrix: include: - - elixir: 1.14.x - otp: 25.x + - elixir: 1.16.x + otp: 26.x steps: - uses: erlef/setup-beam@v1 with: @@ -111,8 +109,8 @@ jobs: strategy: matrix: include: - - elixir: 1.14.x - otp: 25.x + - elixir: 1.16.x + otp: 26.x steps: - uses: erlef/setup-beam@v1 with: @@ -140,8 +138,8 @@ jobs: strategy: matrix: include: - - elixir: 1.14.x - otp: 25.x + - elixir: 1.16.x + otp: 26.x steps: - uses: erlef/setup-beam@v1 with: