Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Conversation

@mai93
Copy link
Contributor

@mai93 mai93 commented Apr 24, 2023

Including headers that are not public in the dependencies broke the build with Bazel@Head because it violates layering_check error. This PR moves headers required by the test targets to hdrs attribute of their direct dependencies.

@drigz
Copy link
Member

drigz commented Apr 25, 2023

I'm a bit worried that this will break downstream projects by making private headers public. After this change, I think a downstream user of glog could #include "stacktrace.h" and get ours instead of theirs.

Since the build error only comes from the unit test, which appears to depend on the private header, rather than from the library itself, it'd be better to fix the tests rather than changing the public interface. Do you know how we could do this? Unfortunately, my Bazel skills are super rusty, which makes me a not-very-good maintainer for this - so if you don't know how to fix it, I'd probably just disable the unit tests that depend on private headers.

@mai93
Copy link
Contributor Author

mai93 commented Apr 27, 2023

Thanks @drigz! That makes sense. I think we can move the shared headers to a filegroup and have the glog and test targets use it.

meteorcloudy added a commit to bazelbuild/continuous-integration that referenced this pull request May 8, 2023
- TensorFlow: waiting on a fix for
tensorflow/tensorflow#60508
- Cargo-Raze: broken by xcode 14.2, re-enable when we upgrade to Xcode
14.3, #1594
- Google logging: waiting on google/glog#916
- upb: https://github.com/protocolbuffers/upb/issues/1290
@drigz drigz merged commit 888f939 into google:master May 15, 2023
sgowroji added a commit to sgowroji/continuous-integration that referenced this pull request May 16, 2023
meteorcloudy pushed a commit to bazelbuild/continuous-integration that referenced this pull request May 16, 2023
fmeum pushed a commit to fmeum/continuous-integration that referenced this pull request Dec 10, 2023
fmeum pushed a commit to fmeum/continuous-integration that referenced this pull request Dec 10, 2023
fweikert pushed a commit to fweikert/continuous-integration that referenced this pull request Mar 27, 2025
fweikert pushed a commit to fweikert/continuous-integration that referenced this pull request Mar 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants