Skip to content

Commit

Permalink
Bring Bazel builds into compliance with upcoming breaking changes
Browse files Browse the repository at this point in the history
This change makes our Bazel build compatible with all the migration-ready
`--incompatible` flags listed
[here](https://github.com/bazelbuild/bazel/releases/tag/7.0.0) for Bazel 7.0,
with a couple exceptions listed below. This was mostly just a matter of
updating some of our dependencies to more recent versions.

The two flags we cannot support yet are these:
 - `--incompatible_disallow_struct_provider_syntax`: Bazel itself appears not
   to support this one yet, see
   [here](bazelbuild/bazel#19467).
 - `--incompatible_stop_exporting_language_modules`: waiting on support in
   `rules_jvm_external`, see
   [here](bazel-contrib/rules_jvm_external#1027).

I also deleted the broken `//:protobuf_nowkt` alias target, which was an
oversight on my part from a previous change.

PiperOrigin-RevId: 597076542
  • Loading branch information
acozzette authored and copybara-github committed Jan 10, 2024
1 parent 3b5b6e9 commit 7a6667b
Show file tree
Hide file tree
Showing 5 changed files with 1,251 additions and 975 deletions.
7 changes: 0 additions & 7 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,6 @@ alias(
visibility = ["//visibility:public"],
)

alias(
name = "protobuf_nowkt",
actual = "//src/google/protobuf:protobuf_nowkt",
deprecation = "Use //:protobuf instead",
visibility = ["//visibility:public"],
)

# The "lite" runtime works for .proto files that specify the option:
# optimize_for = LITE_RUNTIME;
#
Expand Down
6 changes: 4 additions & 2 deletions ci/common.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ build:ubsan --copt=-fno-sanitize=function --copt=-fno-sanitize=vptr
# upcoming breaking changes in Bazel. This list was generated for Bazel 6 by
# running bazelisk with the --migrate flag and filtering out all flags that
# default to true or are deprecated.
build --incompatible_auto_exec_groups
build --incompatible_check_sharding_support
build --incompatible_config_setting_private_default_visibility
build --incompatible_default_to_explicit_init_py
build --incompatible_disable_native_android_rules
build --incompatible_disable_non_executable_java_binary
build --incompatible_disable_starlark_host_transitions
build --incompatible_disable_target_provider_fields
build --incompatible_disallow_empty_glob
build --incompatible_dont_use_javasourceinfoprovider
Expand All @@ -51,8 +55,6 @@ build --incompatible_use_host_features

# We cannot yet build successfully with the following flags:
# --incompatible_check_testonly_for_output_files
# --incompatible_config_setting_private_default_visibility
# --incompatible_disable_starlark_host_transitions
# --incompatible_disallow_struct_provider_syntax
# --incompatible_no_implicit_file_export
# --incompatible_no_rule_outputs_param
Expand Down
Loading

0 comments on commit 7a6667b

Please sign in to comment.