FR: Automatically gather all necessary header files of a target
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Hi, I'm wondering if there was already a way to gather all the necessary header files of a target so they can be integrated with external projects which require the headers w/o necessarily grabbing all of the headers. Additionally, they should keep the directory structure of the headers intact.
It seems like Bazel already has the rules/data in place to be able to do this w/o much additional work. If there's an easy way to do this already, please let me know.
### Which category does this issue belong to?
C++ Rules
### What underlying problem are you trying to solve with this feature?
Integration with external projects which might build a cc_library target but then requires the headers to define the symbols properly, one such example are JNI/NDK Native Android projects.
### Which operating system are you running Bazel on?
linux
### What is the output of `bazel info release`?
_No response_
### If `bazel info release` returns `development version` or `(@non-git)`, tell us how you built Bazel.
_No response_
### What's the output of `git remote get-url origin; git rev-parse HEAD` ?
```text
```
### Have you found anything relevant by searching the web?
_No response_
### Any other information, logs, or outputs that you want to share?
_No response_
Contributor guide
Research direction
No source files, tests, or entry points are named. Start by examining Bazel's existing C++ rules and target data to determine whether headers can already be collected for external projects. Done means exposing the necessary headers while preserving their directory structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100