Skip to content

Support grpc 1.0 (grpc/grpc_server package split)#88

Merged
mjheilmann merged 1 commit into
elixir-grpc:mainfrom
s-lukashenka-micoworks:support-grpc-1.0
Jun 22, 2026
Merged

Support grpc 1.0 (grpc/grpc_server package split)#88
mjheilmann merged 1 commit into
elixir-grpc:mainfrom
s-lukashenka-micoworks:support-grpc-1.0

Conversation

@s-lukashenka-micoworks

Copy link
Copy Markdown
Contributor

Fixes #87.

What

Makes grpc_reflection compatible with grpc 1.0, which split the library into separate grpc (client), grpc_server (server), and grpc_core (shared) packages. The current {:grpc, "~> 0.11.1"} pin blocks any project that bumps grpc to ~> 1.0.

Changes

  • mix.exs: depend on grpc ~> 1.0 (the generated reflection stubs use GRPC.Stub) and grpc_server ~> 1.0 (GRPC.Server/GRPC.Endpoint). Add gun as a test-only dep, since the HTTP client adapters are now optional in grpc 1.0 and the suite connects real stubs.
  • test/support/: drop start_supervised({GRPC.Client.Supervisor, []}). grpc 1.0 starts the client supervisor automatically via its application (mod: {GRPC.Client.Application, []}), so the module is no longer a valid child spec — passing it now raises "module GRPC.Client.Supervisor was given as a child to a supervisor but it does not exist".
  • CHANGELOG.md: note the change.

No changes to shipped library logic were needed — module names are unchanged across the split.

Testing

mix test
# 206 tests, 0 failures, 2 skipped

against grpc 1.0.0 / grpc_server 1.0.0 / grpc_core 1.0.0.

Note on version constraints

I used grpc_server ~> 1.0 and gun ~> 2.0 to match grpc_server's own constraints. Happy to tighten/loosen to your preference, and to gate grpc_server/gun differently if you'd rather keep the client-only footprint smaller.

grpc 1.0 split the client and server into separate packages: `grpc` is
now client-only and the server lives in the new `grpc_server` package
(both backed by `grpc_core`). Module names are unchanged.

- Depend on `grpc ~> 1.0` (the generated reflection stubs `use GRPC.Stub`)
  and `grpc_server ~> 1.0` (`GRPC.Server`/`GRPC.Endpoint`).
- Drop `start_supervised({GRPC.Client.Supervisor, []})` from the test
  support: grpc 1.0 starts the client supervisor automatically via its
  application, so the module is no longer a valid child spec (it now
  fails with "module does not exist").
- Add `gun` as a test-only dependency, since grpc 1.0 made the HTTP
  client adapters optional and the suite connects real stubs.

All 206 tests pass against grpc 1.0 / grpc_server 1.0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@mjheilmann mjheilmann left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thanks!

@mjheilmann mjheilmann merged commit 3ee945b into elixir-grpc:main Jun 22, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support grpc 1.0 (grpc/grpc_server package split)

2 participants