Skip to content

Tweak BUILD setup to make the layering check change less disruptive (cherry-pick)#15838

Merged
acozzette merged 1 commit intoprotocolbuffers:26.xfrom
acozzette:cherry-pick
Feb 14, 2024
Merged

Tweak BUILD setup to make the layering check change less disruptive (cherry-pick)#15838
acozzette merged 1 commit intoprotocolbuffers:26.xfrom
acozzette:cherry-pick

Conversation

@acozzette
Copy link
Copy Markdown

We recently updated the codebase to comply with the Bazel layering check, which essentially requires any C++ header inclusion to be matched with a build dependency on a target providing that header.

As part of that, I removed a handful of dependencies from the //:protobuf target, since these dependencies were not set up in a way that respected the layering check. However, I realized that this may cause a number of breakages, especially since we did not provide the correct public targets until very recently.

This change effectively adds back in the missing dependencies, so that projects which do not yet adhere to the layering check can continue to depend on them indirectly. This way, we still adhere to the layering check and make it possible for projects that depend on us to do so, but in most cases we won't immediately break anyone.

PiperOrigin-RevId: 607021111

We recently updated the codebase to comply with the Bazel layering check, which
essentially requires any C++ header inclusion to be matched with a build
dependency on a target providing that header.

As part of that, I removed a handful of dependencies from the `//:protobuf`
target, since these dependencies were not set up in a way that respected the
layering check. However, I realized that this may cause a number of breakages,
especially since we did not provide the correct public targets until very
recently.

This change effectively adds back in the missing dependencies, so that projects
which do not yet adhere to the layering check can continue to depend on them
indirectly. This way, we still adhere to the layering check and make it
possible for projects that depend on us to do so, but in most cases we won't
immediately break anyone.

PiperOrigin-RevId: 607021111
@acozzette acozzette requested a review from a team as a code owner February 14, 2024 18:05
@acozzette acozzette requested review from zhangskz and removed request for a team February 14, 2024 18:05
@acozzette acozzette added the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Feb 14, 2024
@github-actions github-actions Bot removed the 🅰️ safe for tests Mark a commit as safe to run presubmits over label Feb 14, 2024
@acozzette acozzette merged commit 52aa150 into protocolbuffers:26.x Feb 14, 2024
@acozzette acozzette deleted the cherry-pick branch February 14, 2024 19:21
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.

2 participants