Skip to content

Commit 9a27b09

Browse files
authored
Revert "bazel: reduce native.bind usage for bzlmod migration (#42234)" (#42245)
This reverts commit f7441d0. This broke mobile CI with absl-related issues Signed-off-by: Ryan Northey <[email protected]>
1 parent f7441d0 commit 9a27b09

File tree

5 files changed

+165
-275
lines changed

5 files changed

+165
-275
lines changed

bazel/api_binding.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,13 @@ def envoy_api_binding():
2727
# the API to https://github.com/envoyproxy/data-plane-api.
2828
if "envoy_api" not in native.existing_rules().keys():
2929
_default_envoy_api(name = "envoy_api", reldir = "api")
30+
31+
# TODO(https://github.com/envoyproxy/envoy/issues/7719) need to remove both bindings and use canonical rules
32+
native.bind(
33+
name = "api_httpbody_protos",
34+
actual = "@com_google_googleapis//google/api:httpbody_cc_proto",
35+
)
36+
native.bind(
37+
name = "http_api_protos",
38+
actual = "@com_google_googleapis//google/api:annotations_cc_proto",
39+
)

bazel/envoy_internal.bzl

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -133,36 +133,8 @@ def envoy_copts(repository, test = False):
133133
envoy_select_signal_trace(["-DENVOY_HANDLE_SIGNALS"], repository) + \
134134
_envoy_select_path_normalization_by_default(["-DENVOY_NORMALIZE_PATH_BY_DEFAULT"], repository)
135135

136-
# Mapping of external dependency short names to their actual Bazel targets.
137-
# This replaces the need for native.bind() calls and //external: references.
138-
# TODO(https://github.com/envoyproxy/envoy/issues/7719): Continue migrating
139-
# remaining bindings used by external dependencies.
140-
EXTERNAL_DEPS_MAP = {
141-
# gRPC transcoding
142-
"grpc_transcoding": "@grpc_httpjson_transcoding//src:transcoding",
143-
"path_matcher": "@grpc_httpjson_transcoding//src:path_matcher",
144-
# Google APIs
145-
"api_httpbody_protos": "@com_google_googleapis//google/api:httpbody_cc_proto",
146-
"http_api_protos": "@com_google_googleapis//google/api:annotations_cc_proto",
147-
# nghttp2
148-
"nghttp2": "@envoy//bazel/foreign_cc:nghttp2",
149-
# gRPC
150-
"grpc": "@com_github_grpc_grpc//:grpc++",
151-
"grpc_health_proto": "@envoy//bazel:grpc_health_proto",
152-
# SSL/Crypto (aliases defined in @envoy//bazel)
153-
"ssl": "@envoy//bazel:boringssl",
154-
"crypto": "@envoy//bazel:boringcrypto",
155-
# Bazel tools
156-
"bazel_runfiles": "@bazel_tools//tools/cpp/runfiles",
157-
}
158-
159136
# References to Envoy external dependencies should be wrapped with this function.
160137
def envoy_external_dep_path(dep):
161-
if dep in EXTERNAL_DEPS_MAP:
162-
return EXTERNAL_DEPS_MAP[dep]
163-
164-
# Fall back to //external: for any remaining dependencies
165-
# that are still provided via native.bind() for external consumers.
166138
return "//external:%s" % dep
167139

168140
def envoy_linkstatic():

bazel/jwt_verify_lib.patch

Lines changed: 0 additions & 186 deletions
This file was deleted.

bazel/proxy_wasm_cpp_host.patch

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -310,57 +310,3 @@ index 6db5fd9..aaf7bd2 100644
310310
--
311311
2.50.0.727.gbf7dc18ff4-goog
312312

313-
314-
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
315-
From: Envoy CI <[email protected]>
316-
Date: Mon, 24 Nov 2025 00:00:00 +0000
317-
Subject: [PATCH 4/4] Replace //external: bindings with direct references
318-
319-
Replace //external: bindings with direct @repo// style references
320-
to reduce reliance on native.bind() for bzlmod migration.
321-
---
322-
BUILD | 8 ++++----
323-
1 file changed, 4 insertions(+), 4 deletions(-)
324-
325-
diff --git a/BUILD b/BUILD
326-
index aaf7bd2..b1234567 100644
327-
--- a/BUILD
328-
+++ b/BUILD
329-
@@ -134,7 +134,7 @@ cc_library(
330-
],
331-
deps = [
332-
":wasm_vm_headers",
333-
- "//external:wee8",
334-
+ "@v8//:wee8",
335-
],
336-
)
337-
338-
@@ -152,7 +152,7 @@ cc_library(
339-
],
340-
deps = [
341-
":wasm_vm_headers",
342-
- "//external:wamr",
343-
+ "@envoy//bazel/foreign_cc:wamr",
344-
],
345-
)
346-
347-
@@ -218,7 +218,7 @@ cc_library(
348-
}),
349-
deps = [
350-
":wasm_vm_headers",
351-
- "//external:wasmtime",
352-
+ "@com_github_wasmtime//:wasmtime_lib",
353-
],
354-
)
355-
356-
@@ -277,7 +277,7 @@ cc_library(
357-
}),
358-
deps = [
359-
":wasm_vm_headers",
360-
- "//external:prefixed_wasmtime",
361-
+ "@com_github_wasmtime//:prefixed_wasmtime_lib",
362-
],
363-
)
364-
365-
--
366-
2.50.0.727.gbf7dc18ff4-goog

0 commit comments

Comments
 (0)