From b357854dd6a721cd2719e12cfa967d51a6c461aa Mon Sep 17 00:00:00 2001 From: Reio Piller Date: Mon, 10 Jun 2024 00:17:19 +0300 Subject: [PATCH 1/4] fix: elixir 1.17 warnings --- lib/grpc/server.ex | 4 ++-- lib/grpc/stub.ex | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/grpc/server.ex b/lib/grpc/server.ex index 1896e6fe..958057bf 100644 --- a/lib/grpc/server.ex +++ b/lib/grpc/server.ex @@ -131,7 +131,7 @@ defmodule GRPC.Server do codecs = if http_transcode, do: [GRPC.Codec.JSON | codecs], else: codecs routes = - for {name, _, _, options} = rpc <- service_mod.__rpc_calls__, reduce: [] do + for {name, _, _, options} = rpc <- service_mod.__rpc_calls__(), reduce: [] do acc -> path = "/#{service_name}/#{name}" @@ -147,7 +147,7 @@ defmodule GRPC.Server do [{:grpc, path} | acc] end - Enum.each(service_mod.__rpc_calls__, fn {name, _, _, options} = rpc -> + Enum.each(service_mod.__rpc_calls__(), fn {name, _, _, options} = rpc -> func_name = name |> to_string |> Macro.underscore() |> String.to_atom() path = "/#{service_name}/#{name}" grpc_type = GRPC.Service.grpc_type(rpc) diff --git a/lib/grpc/stub.ex b/lib/grpc/stub.ex index 0a00b608..fb849734 100644 --- a/lib/grpc/stub.ex +++ b/lib/grpc/stub.ex @@ -62,7 +62,7 @@ defmodule GRPC.Stub do service_mod = opts[:service] service_name = service_mod.__meta__(:name) - Enum.each(service_mod.__rpc_calls__, fn {name, {_, req_stream}, {_, res_stream}, _options} = + Enum.each(service_mod.__rpc_calls__(), fn {name, {_, req_stream}, {_, res_stream}, _options} = rpc -> func_name = name |> to_string |> Macro.underscore() path = "/#{service_name}/#{name}" From 5836668e06cc725fbbc1f1728460ba7a30b5b55a Mon Sep 17 00:00:00 2001 From: Reio Piller Date: Mon, 10 Jun 2024 00:23:25 +0300 Subject: [PATCH 2/4] chore: ci otp 27, elixir 1.17 --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4fa81f9..27a622ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,8 @@ jobs: name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} strategy: matrix: - otp: [24.x, 25.x, 26.1.x] - elixir: [1.15.x] + otp: [24.x, 25.x, 26.1.x, 27.x] + elixir: [1.15.x, 1.17.x] include: - otp: 24.x elixir: 1.12.x @@ -86,8 +86,8 @@ jobs: if: ${{ github.ref == 'refs/heads/master' }} strategy: matrix: - otp: [24.x, 25.x, 26.1.x] - elixir: [1.15.x] + otp: [24.x, 25.x, 26.1.x, 27.x] + elixir: [1.15.x, 1.17.x] include: - otp: 24.x elixir: 1.12.x From b1ea10e0e49ab8d1a008c04904bd0a6905ccffae Mon Sep 17 00:00:00 2001 From: Reio Piller Date: Mon, 10 Jun 2024 00:26:38 +0300 Subject: [PATCH 3/4] chore: format --- lib/grpc/stub.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grpc/stub.ex b/lib/grpc/stub.ex index fb849734..2383ad70 100644 --- a/lib/grpc/stub.ex +++ b/lib/grpc/stub.ex @@ -63,7 +63,7 @@ defmodule GRPC.Stub do service_name = service_mod.__meta__(:name) Enum.each(service_mod.__rpc_calls__(), fn {name, {_, req_stream}, {_, res_stream}, _options} = - rpc -> + rpc -> func_name = name |> to_string |> Macro.underscore() path = "/#{service_name}/#{name}" grpc_type = GRPC.Service.grpc_type(rpc) From 6b8fe30550bf02a40cf27299933e2266545ccb50 Mon Sep 17 00:00:00 2001 From: Reio Piller Date: Mon, 10 Jun 2024 00:30:05 +0300 Subject: [PATCH 4/4] chore: ci otp 27, elixir 1.17 remove --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27a622ea..e4fa81f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,8 +33,8 @@ jobs: name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}} strategy: matrix: - otp: [24.x, 25.x, 26.1.x, 27.x] - elixir: [1.15.x, 1.17.x] + otp: [24.x, 25.x, 26.1.x] + elixir: [1.15.x] include: - otp: 24.x elixir: 1.12.x @@ -86,8 +86,8 @@ jobs: if: ${{ github.ref == 'refs/heads/master' }} strategy: matrix: - otp: [24.x, 25.x, 26.1.x, 27.x] - elixir: [1.15.x, 1.17.x] + otp: [24.x, 25.x, 26.1.x] + elixir: [1.15.x] include: - otp: 24.x elixir: 1.12.x