Skip to content

protobuf: Switch to canonical prebuilt protoc toolchain - #46570

Merged
phlax merged 1 commit into
envoyproxy:mainfrom
phlax:protobuf-protoc
Aug 7, 2026
Merged

phlax merged 1 commit into
envoyproxy:mainfrom
phlax:protobuf-protoc

Conversation

@phlax

@phlax phlax commented Aug 7, 2026

Copy link
Copy Markdown
Member

No description provided.

@repokitteh-read-only repokitteh-read-only Bot added the deps Approval required for changes to Envoy's external dependencies label Aug 7, 2026
@repokitteh-read-only

Copy link
Copy Markdown

CC @envoyproxy/dependency-shepherds: Your approval is needed for changes made to (bazel/.*repos.*\.bzl)|(bazel/dependency_imports\.bzl)|(api/bazel/.*\.bzl)|(.*/requirements\.txt)|(.*\.patch).
envoyproxy/dependency-shepherds assignee is @agrawroh

🐱

Caused by: #46570 was opened by phlax.

see: more, trace.

@phlax
phlax force-pushed the protobuf-protoc branch 4 times, most recently from 238b341 to 84bf49c Compare August 7, 2026 12:33
Comment thread bazel/proto_toolchain.bzl
"""Protobuf toolchain helpers for consuming the registered prebuilt protoc.

The `//bazel/private:proto_toolchain_type` target itself has
`visibility = ["//visibility:public"]`; what is private and must not be

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.

weird :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, in the twighlight zone

Comment thread tools/protoc/BUILD
# //bazel:proto_toolchain.bzl instead.
native_binary(
name = "protoc",
src = select({

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.

//bazel:darwin_arm64 and //bazel:darwin_x86_64, which are defined with values = {"cpu": "darwin_arm64"} style. This is the legacy mechanism and may not match correctly under --platforms-based builds. The Linux config_settings use constraint_values, which is the modern approach. This is a pre-existing issue (not introduced by this PR), but it could cause the select to fall through to //conditions:default on macOS in platforms-based builds, compiling protoc from source instead of using the prebuilt binary.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

k - lets look into this separately - #46572

# An arbitrary version of protobuf that includes pre-built binaries.
# See /examples/example_without_cc_toolchain which uses this for testing.
# TODO: add some automation to update this version occasionally.
-_TEST_VERSION = "v33.0"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

i need to check this - it was something the bot created and i missed when picking that boteration - will check

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

removed

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

and readded - turns out this was needed and these are badly named TEST_ - they are the actual hashes used for production

@phlax
phlax force-pushed the protobuf-protoc branch 3 times, most recently from 1b17e03 to fe400b7 Compare August 7, 2026 13:51
jwendell
jwendell previously approved these changes Aug 7, 2026
@repokitteh-read-only repokitteh-read-only Bot removed the deps Approval required for changes to Envoy's external dependencies label Aug 7, 2026
@phlax
phlax force-pushed the protobuf-protoc branch from fe400b7 to 7a0976c Compare August 7, 2026 14:11
@repokitteh-read-only repokitteh-read-only Bot added the deps Approval required for changes to Envoy's external dependencies label Aug 7, 2026
@repokitteh-read-only repokitteh-read-only Bot removed the deps Approval required for changes to Envoy's external dependencies label Aug 7, 2026
@phlax
phlax merged commit 953198c into envoyproxy:main Aug 7, 2026
31 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants