Repository navigation
Conversation
The Bazel client only connects to the server via 127.0.0.1 or [::1] (see BlazeServer::TryConnect), so it never needs DNS resolution. Disabling gRPC's c-ares based resolver avoids building c-ares (and its warnings) and shrinks the client binary by ~350 KB.
fmeum
marked this pull request as ready for review
November 13, 2026 19:34
tjgq
requested changes
Nov 13, 2026
tjgq
left a comment
Contributor
There was a problem hiding this comment.
Nice! Should we also set the define in scripts/bootstrap/bootstrap.sh? (might speed up bootstrap a bit, don't know how much code this is)
tjgq
approved these changes
Nov 14, 2026
tjgq
requested changes
Nov 14, 2026
tjgq
left a comment
Contributor
There was a problem hiding this comment.
Can we now remove c-ares from MODULE.bazel and repositories.bzl? (Sorry, I should have also mentioned this earlier)
c-ares is no longer built, so it needs neither a version override nor a place in the distribution archive. It remains in the module graph as a dependency of gRPC.
None of envoy_api, googleapis-grpc-java, googleapis-java, opencensus-cpp, rules_fuzzing and toml.bzl is fetched when analyzing //src:bazel or //src:bazel_nojdk, and none of them is loaded on any select branch. Bazel uses gRPC's unsecure targets, which don't depend on xDS and thus envoy_api. toml.bzl was only loaded by the pip extension, which the bootstrap no longer evaluates since 53824fa.
tjgq
approved these changes
Nov 15, 2026
copybara-service Bot
pushed a commit
that referenced
this pull request
Nov 17, 2026
Fixes the Bazel-side warnings printed by `bazel build --config=llvm //src:bazel-dev` on a clean output base: * Replace the `--cpu`-based `config_setting`s in `//src/conditions`, which trigger a deprecation warning (`select() on cpu is deprecated`), with the existing constraint-based ones. Bazel CI doesn't use `--cpu` anymore. * Set `legacy_create_init = 0` on Bazel's own `py_binary` targets (`//src:create_embedded_tools`, `//tools/build_defs/proguard:wrapper_private`) to address the rules_python implicit `__init__.py` deprecation. * Drop the explicit `jar` packaging from Maven coordinates (`Assuming ... should be interpreted as ...`) and declare `known_contributing_modules` for the `maven` repo. `maven_install.json` only changes its input hash. * Only pass the `java_proto_library` for the service to `java_grpc_library`, as multiple `deps` are deprecated. The longrunning protos are covered transitively. * Exclude incubator modules from the "all modules" embedded JDK, which jlink warns about (`Using incubator modules: jdk.incubator.vector`) and Bazel doesn't use. Remaining warnings are fixed elsewhere and will be picked up by follow-up dependency updates: * c-ares: #32649 (drop c-ares), bazelbuild/bazel-central-registry#11756 * zstd-jni: bazelbuild/bazel-central-registry#11757 (zstd-jni 1.5.7-26) * protobuf: deprecated `GetEnum`/`GetRepeatedEnum` calls are fixed in protobuf 37.0 * rules_pkg: bazelbuild/rules_pkg#1097 * gRPC: grpc/grpc#43933, grpc/grpc-java#13188 * Mirror: #32646 Closes #32651 COPYBARA_INTEGRATE_REVIEW=#32651 from fmeum:fix-build-warnings 5f5e9c3 PiperOrigin-RevId: 1023592606 Change-Id: Ia04594ff9c771f596c291bf0d4785915124c6a5a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Bazel client only connects to the server via
127.0.0.1or[::1](enforced inBlazeServer::TryConnect), so it never needs DNS resolution. For IP literals, gRPC doesn't consult the resolver anyway. This PR sets--define=grpc_no_ares=trueso that gRPC is built withGRPC_ARES=0and c-ares drops out of the build graph of//src:bazelentirely, which also removes the c-ares compiler warnings (unused function/variable, deprecated c-ares APIs used by gRPC). Since c-ares is no longer built, its version override and its entry in the distribution archive are removed as well. envoy_api, googleapis-grpc-java, googleapis-java, opencensus-cpp, rules_fuzzing and toml.bzl are also dropped from the distribution archive, since a build of Bazel no longer fetches them.