dep-protobuf/bazel
Joshua Haberman 2f32a3efb2 Refactor protobuf flag abstraction layer to custom flag targets
Instead of having rules depend on both native and Starlark versions of flags and reconciling them inside the rule implementation, this change moves the resolution logic into custom build setting flag targets (`compat_bool_flag` and `compat_string_list_flag`) defined in `third_party/protobuf/bazel/private/compat_flag.bzl`.

Key details:
- `compat_bool_flag`: Defines a string build setting flag target with a "default" sentinel value. When un-set on the command line, it falls back dynamically to reading native options on `ctx.fragments.proto` or default values, providing a boolean `BuildSettingInfo`.
- `compat_string_list_flag`: Defines a string-list build setting flag target that reconciles explicit Starlark build settings with `ctx.fragments.proto` and default values.
- Rules reference the flag targets directly (without separate helper `_compat` targets or `config_setting` rules).
- Replaces `native_bool_flag.bzl` with `compat_flag.bzl`.

PiperOrigin-RevId: 955468205
2026-07-28 14:22:18 -07:00
..
common Internal Change 2026-07-15 08:35:16 -07:00
flags Refactor protobuf flag abstraction layer to custom flag targets 2026-07-28 14:22:18 -07:00
private Refactor protobuf flag abstraction layer to custom flag targets 2026-07-28 14:22:18 -07:00
tests Refactor protobuf flag abstraction layer to custom flag targets 2026-07-28 14:22:18 -07:00
toolchains Post-Bazel 7 cleanups. 2026-03-28 13:02:10 -07:00
BUILD chore: add a unit test for .github/release_prep.sh (#26247) 2026-07-08 08:05:06 -07:00
cc_proto_library.bzl Dropped support for Bazel 7. 2026-02-14 14:50:17 -08:00
java_lite_proto_library.bzl Dropped support for Bazel 7. 2026-02-14 14:50:17 -08:00
java_proto_library.bzl Dropped support for Bazel 7. 2026-02-14 14:50:17 -08:00
proto_descriptor_set.bzl Migrate proto_descriptor_set (#23369) 2025-10-02 10:01:01 -07:00
proto_library.bzl Dropped support for Bazel 7. 2026-02-14 14:50:17 -08:00
py_proto_library.bzl Refactored and rearranged Bazel rules. 2026-01-27 20:24:28 -08:00
upb_c_proto_library.bzl Fix breaking change related to upb_c_proto_library and upb_proto_reflection_library 2026-01-30 12:12:49 -08:00
upb_proto_reflection_library.bzl Actually fix breaking change related to upb_proto_reflection_library 2026-01-30 13:27:22 -08:00