Skip to content

fix(core): accept googleapis 0.2 and require Elixir ~> 1.17 - #664

Merged
polvalente merged 2 commits into
elixir-grpc:masterfrom
palermo-git:fix/grpc-core-googleapis-0.2
Nov 20, 2026
Merged

polvalente merged 2 commits into
elixir-grpc:masterfrom
palermo-git:fix/grpc-core-googleapis-0.2

Conversation

@palermo-git

@palermo-git palermo-git commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

grpc_core pins {:googleapis, "~> 0.1.0"}, and googleapis 0.1.0 requires Elixir ~> 1.18, above what the grpc libraries declare. On an older supported Elixir, Mix prints the dependency :googleapis requires Elixir "~> 1.18" and the project runs a combination googleapis doesn't support.

googleapis 0.2.0 lowers its requirement to ~> 1.15 (elixir-grpc/googleapis#2) and regenerates the stubs with current protobuf (#4), which grpc_core already requires (~> 0.17). This PR:

  • allows {:googleapis, "~> 0.1.0 or ~> 0.2.0"} in grpc_core, so existing locks keep 0.1.0 and new resolutions can take 0.2.0;
  • requires Elixir ~> 1.17 in grpc, grpc_core and grpc_server (was ~> 1.15), matching CI's oldest lane (Elixir 1.17 / OTP 27), as requested in review.

I checked that 0.2.0 is compatible with everything grpc uses from it (git grep 'Google\.' across grpc_core, grpc and grpc_server):

  • Google.Api.Http, Google.Api.HttpRule, Google.Api.CustomHttpPattern and Google.Rpc.Status are field-for-field identical in v0.1.0 and v0.2.0.
  • Google.Api.PbExtension keeps every v0.1.0 extension (including :http, 72_295_728, used by GRPC.Service) and adds one, :routing.
  • v0.2.0's file set is v0.1.0's plus four new files.
  • The Google.Protobuf.* modules grpc uses come from protobuf, not googleapis.

The locks still resolve 0.1.0, so CI keeps testing that. Running mix deps.update googleapis in grpc_core would let CI exercise 0.2.0 too, if you want this PR to carry the lock change.

grpc_core declares `elixir: "~> 1.15"` but pins `googleapis ~> 0.1.0`,
and googleapis 0.1.0 requires Elixir `~> 1.18`. Projects on Elixir 1.15
to 1.17 therefore get "the dependency :googleapis requires Elixir
~> 1.18" and run an unsupported combination.

googleapis 0.2.0 drops that requirement back to `~> 1.15` (its PR elixir-grpc#2) and
regenerates the stubs with current protobuf (elixir-grpc#4), which grpc_core
already requires (`~> 0.17`). Allow both so existing locks keep 0.1.0
and new resolutions can take 0.2.0.
@polvalente

Copy link
Copy Markdown
Contributor

Could you also bump the required version to Elixir 1.17 for all 3 grpc libs?

CI's oldest lane is Elixir 1.17 on OTP 27, so 1.17 is the floor the
libraries are tested on. Declare it.
@palermo-git palermo-git changed the title fix(core): accept googleapis 0.2, so the declared Elixir ~> 1.15 holds fix(core): accept googleapis 0.2 and require Elixir ~> 1.17 Nov 20, 2026
@palermo-git

Copy link
Copy Markdown
Contributor Author

Done in 7cf8ccd: grpc, grpc_core and grpc_server now declare elixir: "~> 1.17", matching CI's oldest lane (1.17 / OTP 27). I've updated the title and description to match.

@polvalente
polvalente merged commit 31336d0 into elixir-grpc:master Nov 20, 2026
5 checks passed
@palermo-git

Copy link
Copy Markdown
Contributor Author

Thanks for merging this and #663. Is a release planned that includes both? Downstream, a library with an optional gRPC transport can then resolve googleapis 0.2 on Elixir 1.17, and hosts that leave out :gun compile without the Gun helper modules. Neither change is on Hex yet (grpc, grpc_core and grpc_server are at 1.1.0).

@palermo-git
palermo-git deleted the fix/grpc-core-googleapis-0.2 branch November 20, 2026 14:00
@polvalente

Copy link
Copy Markdown
Contributor

Thanks for merging this and #663. Is a release planned that includes both? Downstream, a library with an optional gRPC transport can then resolve googleapis 0.2 on Elixir 1.17, and hosts that leave out :gun compile without the Gun helper modules. Neither change is on Hex yet (grpc, grpc_core and grpc_server are at 1.1.0).

I expect to release something in the next coupld days. Lots of fixes merged today with a couple more merging soon.

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.

2 participants