Skip to content

Fix warnings when building Bazel - #32651

Closed
fmeum wants to merge 1 commit into
bazelbuild:masterfrom
fmeum:fix-build-warnings
Closed

fmeum wants to merge 1 commit into
bazelbuild:masterfrom
fmeum:fix-build-warnings

Conversation

@fmeum

@fmeum fmeum commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Fixes the Bazel-side warnings printed by bazel build --config=llvm //src:bazel-dev on a clean output base:

  • Replace the --cpu-based config_settings 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:

* Replace the `--cpu`-based `config_setting`s in `//src/conditions`, which
  trigger a deprecation warning, 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.
* Drop the explicit `jar` packaging from Maven coordinates and declare the
  modules contributing to the `maven` repo to silence rules_jvm_external
  warnings.
* 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 and Bazel doesn't use.
@fmeum
fmeum marked this pull request as ready for review November 13, 2026 21:10
@fmeum
fmeum requested a review from meteorcloudy November 13, 2026 21:10
@github-actions github-actions Bot added the awaiting-review PR is awaiting review from an assigned reviewer label Nov 13, 2026

@meteorcloudy meteorcloudy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@meteorcloudy meteorcloudy added copybara:import Trigger copybara to import the PR and removed awaiting-review PR is awaiting review from an assigned reviewer labels Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copybara:import Trigger copybara to import the PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants