Conversation
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Bazel macros to use repository parameter instead of hard-coded labels
bazel: make public macros bzlmod-safe without Sep 20, 2026
repository prefixing
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.
Envoy’s public Bazel macros were resolving internal labels in the caller’s repo mapping, so downstream bzlmod consumers broke unless they passed
repository = "@envoy"as a workaround. This change makes macro-internal label resolution repository-stable and replaces the repo-prefix escape hatch with explicit override points where substitution is actually legitimate.Replace macro-internal string labels with
Label(...)repository + "//...","%s//..." % repository,repo_label(...), and hard-coded@envoy//...uses in Envoy Bazel macros/helpers toLabel(...).str(Label(...))for$(location ...)/$(rlocationpath ...)callsites so location expansion continues to work with canonical labels.envoy_build_system.bzl, plus targeted Envoy Mobile-owned macro internals.Deprecate
repositorywithout silently changing override behaviorrepositoryfor compatibility.repository=""andrepository="@envoy"continue to work.@envoy//bazellabel-flag overrides.repositoryfrom internal helper APIs where it was only being used as a label-prefix mechanism.Add explicit label-flag override points
//bazel:test_main→//test:main//bazel:test_pch→//test:test_pchbazel/README.md.Expand the external bzlmod yardstick
repository = "@envoy"workaround frombazel/tests/external.envoy_cc_libraryenvoy_cc_extensionenvoy_cc_binaryenvoy_cc_testenvoy_cc_test_libraryenvoy_cc_mockenvoy_cc_benchmark_binary+envoy_benchmark_testenvoy_select_*helpers in downstream deps.ci/do_ci.sh externalto runbazel test //...in the external module.Keep adjacent downstream-facing Bazel support consistent
.bazelrclabel-flag plumbing for quiche/proxy-wasm/libsxg so the downstream yardstick continues to reflect a real consumer setup.Fix a newly exposed test header dependency
test/test_common/test_runtime.hrelied on transitive PCH-provided inclusion ofabsl::FlagSaver.