Add `textual_hdrs` to cc_binary
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
### Description of the feature request:
Given that there is an allowlist of possible file extensions in `hdrs=` and that `cc_binary` doesn't have a `textual_hdrs` attribute, there isn't really a good way to say "this `cc_binary` has a source file that is included from somewhere but it doesn't compile by itself".
Sounds like a logical addition and nice polish.
### Which category does this issue belong to?
C++/Objective-C Rules
### What underlying problem are you trying to solve with this feature?
_No response_
### Which operating system are you running Bazel on?
\
### 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 master; git rev-parse HEAD` ?
_No response_
### 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
Start at the cc_binary rule and the existing hdrs attribute allowlist; the issue does not name implementation files or tests. Determine how textual_hdrs should be represented for cc_binary, then add coverage showing that a source included elsewhere is accepted without compiling independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, objective-c
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100