Skip to content

grpc-protobuf: disable grpc default features - #2816

Merged
arjan-bal merged 1 commit into
grpc:masterfrom
DarkCat09:master
Aug 25, 2026
Merged

grpc-protobuf: disable grpc default features#2816
arjan-bal merged 1 commit into
grpc:masterfrom
DarkCat09:master

Conversation

@DarkCat09

@DarkCat09 DarkCat09 commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Motivation

grpc-protobuf crate depends on grpc without disabling default features.

I don't want to bring the entire Hickory Resolver into my project since i don't even need DNS resolution, so i add grpc as --no-default-features -F _runtime-tokio.
But then i add grpc-protobuf, and Hickory's dependency tree appears again, because it requires the default features of grpc including dns, which i specifically wanted to opt-out from.

Solution

Set default_features = false for grpc dependency in grpc-protobuf, so this utility crate doesn't opt-in for possibly undesired grpc crate features.

By the way, the same thing is already done in grpc-google (though i don't know if the reason was the same):

grpc = { path = "../grpc", default-features = false }

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 18, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: DarkCat09 / name: DarkCat09 (5f7e795)

@arjan-bal arjan-bal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@arjan-bal arjan-bal changed the title grpc-protobuf: do not enable grpc default features grpc-protobuf: disable grpc default features Aug 25, 2026
@arjan-bal arjan-bal added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-grpc-next labels Aug 25, 2026
@arjan-bal
arjan-bal merged commit 1aeba42 into grpc:master Aug 25, 2026
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-grpc-next C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants