From de8ea03bbdd831bae532f06ea95527ea2e0d98a3 Mon Sep 17 00:00:00 2001 From: Adriano Santos Date: Wed, 8 Apr 2026 14:38:04 -0300 Subject: [PATCH 1/5] chore: added notes regarding the separation of client and server packages. --- README.md | 7 ++++++- grpc_server/README.md | 9 ++++++--- mix.lock | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b9845e110..c3c26d053 100644 --- a/README.md +++ b/README.md @@ -46,12 +46,15 @@ The package can be installed as: def deps do [ {:grpc, "~> 0.11"}, + {:grpc_server, "~> 0.11"}, {:protobuf, "~> 0.14"}, # optional for import wellknown google types {:grpc_reflection, "~> 0.2"} # optional enable grpc reflection ] end ``` +>**_Note (since v1.0.0-rc.1)_**: To use the server, you must add the :grpc_server dependency to your mix.exs instead of the older :grpc package. + ## Protobuf Code Generation Use `protoc` with [protobuf elixir plugin](https://github.com/elixir-protobuf/protobuf) or using [protobuf_generate](https://hexdocs.pm/protobuf_generate/readme.html) hex package to generate the necessary files. @@ -91,7 +94,7 @@ protoc --elixir_out=plugins=grpc:./lib -I./priv/protos helloworld.proto All RPC calls must be implemented using the stream-based API, even for unary requests. ->__NOTE__: The old API was deprecated based on `GRPC.Server.send_reply/2` and direct `struct` returns was deprecated as of version `0.10.x`. +>**_Note_**: The old API was deprecated based on `GRPC.Server.send_reply/2` and direct `struct` returns was deprecated as of version `0.10.x`. ### Unary RPC using Stream API @@ -283,6 +286,8 @@ end This section demonstrates how to establish client connections and perform RPC calls using the Elixir gRPC client. +>**_Note (since v1.0.0-rc.1)_**: To use the client, you must explicitly add the :grpc dependency to your mix.exs. + --- ## Basic Connection and RPC diff --git a/grpc_server/README.md b/grpc_server/README.md index 4ad3500fe..b88fbbb75 100644 --- a/grpc_server/README.md +++ b/grpc_server/README.md @@ -42,6 +42,8 @@ def deps do end ``` +>**_Note (since v1.0.0-rc.1)_**: To use the server, you must add the :grpc_server dependency to your mix.exs instead of the older :grpc package. + ## Protobuf Code Generation Use `protoc` with [protobuf elixir plugin](https://github.com/elixir-protobuf/protobuf) or using [protobuf_generate](https://hexdocs.pm/protobuf_generate/readme.html) hex package to generate the necessary files. @@ -81,7 +83,7 @@ protoc --elixir_out=plugins=grpc:./lib -I./priv/protos helloworld.proto All RPC calls must be implemented using the stream-based API, even for unary requests. ->__NOTE__: The old API was deprecated based on `GRPC.Server.send_reply/2` and direct `struct` returns was deprecated as of version `0.10.x`. +>**_Note_**: The old API was deprecated based on `GRPC.Server.send_reply/2` and direct `struct` returns was deprecated as of version `0.10.x`. ### Unary RPC using Stream API @@ -236,7 +238,7 @@ By normalizing all possible outcomes, `GRPC.Stream` ensures fault-tolerant, exce This unified model allows developers to build composable and reliable streaming pipelines that gracefully recover from both domain and runtime errors. ->_NOTE_: In the example above, we could use `map_error/2` instead of `map/2` to handle error cases explicitly. However, since the function also performs a transformation on successful values, `map/2` remains appropriate and useful in this context. +>**_Note_**: In the example above, we could use `map_error/2` instead of `map/2` to handle error cases explicitly. However, since the function also performs a transformation on successful values, `map/2` remains appropriate and useful in this context. --- @@ -287,6 +289,7 @@ A TLS configuration can be defined by assigning a `%GRPC.Credential{}` struct, t This section demonstrates how to establish client connections and perform RPC calls using the Elixir gRPC client. +>**_Note (since v1.0.0-rc.1)_**: To use the client, you must explicitly add the :grpc dependency to your mix.exs. --- ## Basic Connection and RPC @@ -362,7 +365,7 @@ iex> {:ok, reply} = channel |> Orders.OrderService.Stub.get_order(request) iex> {:ok, channel} = GRPC.Stub.connect("unix:/tmp/my.sock") ``` ->__NOTE__: When using `DNS` or `xDS` targets, the connection layer periodically refreshes endpoints. +>**_Note_**: When using `DNS` or `xDS` targets, the connection layer periodically refreshes endpoints. --- ## Compression and Metadata diff --git a/mix.lock b/mix.lock index 427f40b39..ffa77b643 100644 --- a/mix.lock +++ b/mix.lock @@ -4,6 +4,7 @@ "flow": {:hex, :flow, "1.2.4", "1dd58918287eb286656008777cb32714b5123d3855956f29aa141ebae456922d", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "874adde96368e71870f3510b91e35bc31652291858c86c0e75359cbdd35eb211"}, "gen_stage": {:hex, :gen_stage, "1.3.2", "7c77e5d1e97de2c6c2f78f306f463bca64bf2f4c3cdd606affc0100b89743b7b", [:mix], [], "hexpm", "0ffae547fa777b3ed889a6b9e1e64566217413d018cabd825f786e843ffe63e7"}, "googleapis": {:hex, :googleapis, "0.1.0", "13770f3f75f5b863fb9acf41633c7bc71bad788f3f553b66481a096d083ee20e", [:mix], [{:protobuf, "~> 0.12", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "1989a7244fd17d3eb5f3de311a022b656c3736b39740db46506157c4604bd212"}, + "grpc_core": {:hex, :grpc_core, "1.0.0-rc.1", "d82957bca32937bb52df06596cca7550783acc139a06b70202a982ef8b59490e", [:mix], [{:googleapis, "~> 0.1.0", [hex: :googleapis, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.14", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "c76233ea374421da562b5b022c22614e81f9cf862da93543cff93c37c085f136"}, "gun": {:hex, :gun, "2.2.0", "b8f6b7d417e277d4c2b0dc3c07dfdf892447b087f1cc1caff9c0f556b884e33d", [:make, :rebar3], [{:cowlib, ">= 2.15.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "76022700c64287feb4df93a1795cff6741b83fb37415c40c34c38d2a4645261a"}, "hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"}, "jason": {:hex, :jason, "1.4.4", "b9226785a9aa77b6857ca22832cffa5d5011a667207eb2a0ad56adb5db443b8a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "c5eb0cab91f094599f94d55bc63409236a8ec69a21a67814529e8d5f6cc90b3b"}, From 5eaf3106e39b7c162336851d89e55cdc22f2ab66 Mon Sep 17 00:00:00 2001 From: Adriano Santos Date: Mon, 27 Jul 2026 12:47:43 -0300 Subject: [PATCH 2/5] chore: release v1.0.3 --- grpc/mix.exs | 4 ++-- grpc_core/mix.exs | 2 +- grpc_server/mix.exs | 4 ++-- mix.exs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/grpc/mix.exs b/grpc/mix.exs index 21318bbbd..a5672bcce 100644 --- a/grpc/mix.exs +++ b/grpc/mix.exs @@ -2,7 +2,7 @@ defmodule GRPC.MixProject do use Mix.Project @source_url "https://github.com/elixir-grpc/grpc/tree/master/grpc" - @version "1.0.2" + @version "1.0.3" def project do [ @@ -30,7 +30,7 @@ defmodule GRPC.MixProject do defp deps do [ # {:grpc_core, path: "../grpc_core"}, - {:grpc_core, "~> 1.0.2"}, + {:grpc_core, "~> 1.0.3"}, {:gun, "~> 2.4.0", optional: true}, {:mint, "~> 1.9", optional: true}, {:castore, "~> 1.0", optional: true}, diff --git a/grpc_core/mix.exs b/grpc_core/mix.exs index 96324415e..549f80289 100644 --- a/grpc_core/mix.exs +++ b/grpc_core/mix.exs @@ -2,7 +2,7 @@ defmodule GRPC.Core.MixProject do use Mix.Project @source_url "https://github.com/elixir-grpc/grpc_core" - @version "1.0.2" + @version "1.0.3" def project do [ diff --git a/grpc_server/mix.exs b/grpc_server/mix.exs index 7ffcc9e5a..195c7b175 100644 --- a/grpc_server/mix.exs +++ b/grpc_server/mix.exs @@ -2,7 +2,7 @@ defmodule GRPC.Server.MixProject do use Mix.Project @source_url "https://github.com/elixir-grpc/grpc_server" - @version "1.0.2" + @version "1.0.3" def project do [ @@ -34,7 +34,7 @@ defmodule GRPC.Server.MixProject do defp deps do [ # {:grpc_core, path: "../grpc_core"}, - {:grpc_core, "~> 1.0.2"}, + {:grpc_core, "~> 1.0.3"}, {:protobuf, "~> 0.17"}, {:cowboy, "~> 2.14"}, {:cowlib, "~> 2.14"}, diff --git a/mix.exs b/mix.exs index bc4ef6709..bb5955d9d 100644 --- a/mix.exs +++ b/mix.exs @@ -1,7 +1,7 @@ defmodule GRPC.GRPCRoot do use Mix.Project - @version "1.0.2" + @version "1.0.3" def project do [ From b40f4058916ea63aa360371a797dbb8110db1332 Mon Sep 17 00:00:00 2001 From: Adriano Santos Date: Mon, 27 Jul 2026 12:48:20 -0300 Subject: [PATCH 3/5] chore: release v1.0.3 --- benchmark/mix.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmark/mix.exs b/benchmark/mix.exs index fb10571d5..ab89cbc94 100644 --- a/benchmark/mix.exs +++ b/benchmark/mix.exs @@ -1,6 +1,6 @@ defmodule Benchmark.MixProject do use Mix.Project - @version "1.0.0-rc.1" + @version "1.0.3" def project do [ From feb3139543385ce59f523e1adef57a29ab3e49a0 Mon Sep 17 00:00:00 2001 From: Adriano Santos Date: Mon, 27 Jul 2026 13:09:31 -0300 Subject: [PATCH 4/5] chore: update changelog --- grpc/CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/grpc/CHANGELOG.md b/grpc/CHANGELOG.md index c3be84387..9b61b4a46 100644 --- a/grpc/CHANGELOG.md +++ b/grpc/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Unreleased +## v1.0.3 (2026-07-27) ### Enhancements @@ -15,6 +15,9 @@ ### Bug Fixes + * Fixed a client supervisor child leak on failed and closed connections in `GRPC.Client.Connection`. + * Fixed Mint adapter connection stability when a stream response process exits unexpectedly, preventing the whole connection process from crashing. + * Fixed a Mint adapter `BadMapError` in `State.stream_response_pid/2`. * Removed the `GRPC.Channel.t()` typespec. It declared `host`/`port` non-nil and `interceptors` as `[]`, but a virtual channel (built with `host: nil`/`port: nil` and a non-empty `interceptors` list) violated the type. Combined with `pick_channel/2`'s `@spec`, this made Dialyzer infer `connect/2` could only return `{:error, _}`, spuriously flagging `{:ok, channel}` matches in downstream code as unreachable. References to the type are now `struct()`. ## v1.0.0 (2026-06-15) From 210e6def1ecd3b4aaa2e544e6163e35d933f79c5 Mon Sep 17 00:00:00 2001 From: Adriano Santos Date: Mon, 27 Jul 2026 13:21:11 -0300 Subject: [PATCH 5/5] chore: update dependencies --- grpc/mix.lock | 2 +- grpc_server/mix.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc/mix.lock b/grpc/mix.lock index f1aa3db68..052db4885 100644 --- a/grpc/mix.lock +++ b/grpc/mix.lock @@ -8,7 +8,7 @@ "flow": {:hex, :flow, "1.2.4", "1dd58918287eb286656008777cb32714b5123d3855956f29aa141ebae456922d", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "874adde96368e71870f3510b91e35bc31652291858c86c0e75359cbdd35eb211"}, "gen_stage": {:hex, :gen_stage, "1.3.2", "7c77e5d1e97de2c6c2f78f306f463bca64bf2f4c3cdd606affc0100b89743b7b", [:mix], [], "hexpm", "0ffae547fa777b3ed889a6b9e1e64566217413d018cabd825f786e843ffe63e7"}, "googleapis": {:hex, :googleapis, "0.1.0", "13770f3f75f5b863fb9acf41633c7bc71bad788f3f553b66481a096d083ee20e", [:mix], [{:protobuf, "~> 0.12", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "1989a7244fd17d3eb5f3de311a022b656c3736b39740db46506157c4604bd212"}, - "grpc_core": {:hex, :grpc_core, "1.0.2", "217a0bee1a266dd4f8378629d344f6a555db209011ab37355bfa61a0b9f62eea", [:mix], [{:googleapis, "~> 0.1.0", [hex: :googleapis, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.17", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "73b916dc3f2767bd68f95a35507a9c2b389fb71997fad16558184f40b6fa148a"}, + "grpc_core": {:hex, :grpc_core, "1.0.3", "f638ad846b432c8e1b4c28613001ce5a18cbc95d760b0c662091b37e5ddf97e6", [:mix], [{:googleapis, "~> 0.1.0", [hex: :googleapis, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.17", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8167fa6e06190d229df25b2386173b385add6682f87c27960699439083145f78"}, "gun": {:hex, :gun, "2.4.1", "c3a8bff8e155e1fc8e499216599bb7effbd27bc1985662a8b25016090dc18428", [:make, :rebar3], [{:cowlib, ">= 2.15.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "1450575b4d393aa0811322727b90ad1dd94b5c10026f54a1641785bcbd250384"}, "hpax": {:hex, :hpax, "1.0.3", "ed67ef51ad4df91e75cc6a1494f851850c0bd98ebc0be6e81b026e765ee535aa", [:mix], [], "hexpm", "8eab6e1cfa8d5918c2ce4ba43588e894af35dbd8e91e6e55c817bca5847df34a"}, "jason": {:hex, :jason, "1.4.5", "2e3a008590b0b8d7388c20293e9dcc9cf3e5d642fd2a114e4cbbb52e595d940a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b0c823996102bcd0239b3c2444eb00409b72f6a140c1950bc8b457d836b30684"}, diff --git a/grpc_server/mix.lock b/grpc_server/mix.lock index 3e4e19ec2..7d61cbcbe 100644 --- a/grpc_server/mix.lock +++ b/grpc_server/mix.lock @@ -8,7 +8,7 @@ "flow": {:hex, :flow, "1.2.4", "1dd58918287eb286656008777cb32714b5123d3855956f29aa141ebae456922d", [:mix], [{:gen_stage, "~> 1.0", [hex: :gen_stage, repo: "hexpm", optional: false]}], "hexpm", "874adde96368e71870f3510b91e35bc31652291858c86c0e75359cbdd35eb211"}, "gen_stage": {:hex, :gen_stage, "1.3.2", "7c77e5d1e97de2c6c2f78f306f463bca64bf2f4c3cdd606affc0100b89743b7b", [:mix], [], "hexpm", "0ffae547fa777b3ed889a6b9e1e64566217413d018cabd825f786e843ffe63e7"}, "googleapis": {:hex, :googleapis, "0.1.0", "13770f3f75f5b863fb9acf41633c7bc71bad788f3f553b66481a096d083ee20e", [:mix], [{:protobuf, "~> 0.12", [hex: :protobuf, repo: "hexpm", optional: false]}], "hexpm", "1989a7244fd17d3eb5f3de311a022b656c3736b39740db46506157c4604bd212"}, - "grpc_core": {:hex, :grpc_core, "1.0.2", "217a0bee1a266dd4f8378629d344f6a555db209011ab37355bfa61a0b9f62eea", [:mix], [{:googleapis, "~> 0.1.0", [hex: :googleapis, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.17", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "73b916dc3f2767bd68f95a35507a9c2b389fb71997fad16558184f40b6fa148a"}, + "grpc_core": {:hex, :grpc_core, "1.0.3", "f638ad846b432c8e1b4c28613001ce5a18cbc95d760b0c662091b37e5ddf97e6", [:mix], [{:googleapis, "~> 0.1.0", [hex: :googleapis, repo: "hexpm", optional: false]}, {:jason, ">= 0.0.0", [hex: :jason, repo: "hexpm", optional: false]}, {:protobuf, "~> 0.17", [hex: :protobuf, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8167fa6e06190d229df25b2386173b385add6682f87c27960699439083145f78"}, "gun": {:hex, :gun, "2.4.1", "c3a8bff8e155e1fc8e499216599bb7effbd27bc1985662a8b25016090dc18428", [:make, :rebar3], [{:cowlib, ">= 2.15.0 and < 3.0.0", [hex: :cowlib, repo: "hexpm", optional: false]}], "hexpm", "1450575b4d393aa0811322727b90ad1dd94b5c10026f54a1641785bcbd250384"}, "jason": {:hex, :jason, "1.4.5", "2e3a008590b0b8d7388c20293e9dcc9cf3e5d642fd2a114e4cbbb52e595d940a", [:mix], [{:decimal, "~> 1.0 or ~> 2.0 or ~> 3.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "b0c823996102bcd0239b3c2444eb00409b72f6a140c1950bc8b457d836b30684"}, "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"},