Util lib: use libraries directly instead of header forwarding lib - #30930
Closed
hzeller wants to merge 1 commit into
Closed
Util lib: use libraries directly instead of header forwarding lib#30930hzeller wants to merge 1 commit into
hzeller wants to merge 1 commit into
Conversation
hzeller
force-pushed
the
feature-20260831-utl
branch
2 times, most recently
from
August 31, 2026 12:17
0529843 to
41103dd
Compare
meisterT
approved these changes
Aug 31, 2026
hzeller
force-pushed
the
feature-20260831-utl
branch
from
August 31, 2026 19:28
41103dd to
425925e
Compare
Contributor
Author
|
Alright, had to rebase as some BUILD files changed in the meantime. |
Using a public library just to make headers visible is a bazel anti-pattern. Operations: ```bash # Remove all headers and dependcies on the forwarding library so that it is # not considered a good candidate for bant dwyu. buildozer 'remove hdrs' //src/main/cpp/util buildozer 'remove deps' //src/main/cpp/util # Add necessary visibility to the libraries to directly depend on buildozer 'add visibility //src/test/cpp/util:__pkg__' //src/main/cpp/util:numbers buildozer 'add visibility //src/test/cpp/util:__pkg__' //src/main/cpp/util:port buildozer 'add visibility //src/main/cpp:__subpackages__' //src/main/cpp/util:filesystem buildozer 'add visibility //src/main/cpp:__subpackages__' //src/main/cpp/util:md5 buildozer 'add visibility //src/main/cpp:__subpackages__' //src/main/cpp/util:numbers # Fix all dependencies, but narrow to affected targtes with cpp/util in their path) . <(bant dwyu ... -g cpp/util) # Now, we can remove the dependency on the old util library. buildozer 'remove deps //src/main/cpp/util' $(bant list-targets ... -g cc_ -c3) # Now that it is not referenced anymore, it can be removed. buildozer delete //src/main/cpp/util ```
hzeller
force-pushed
the
feature-20260831-utl
branch
from
September 1, 2026 15:33
425925e to
cdf73e4
Compare
Contributor
Author
|
what is the status here, anything else needed ? |
meteorcloudy
approved these changes
Sep 1, 2026
Contributor
Author
|
mmh, so what is the copybara situation ? Can't see it ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using a public library just to make headers visible is a bazel anti-pattern.
Operations: