rust-lang / rust-lang/rust-bindgen
--wrap-static-fns doesn't output anything if it doesn't find static functions
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.3k
- Forks
- 829
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 15
Description
On the surface, this looks like fine behavior. If you don't find anything to put in the file, don't write the file. However, this wreaks havoc on build systems because now whether or not a file is output at all depends on the contents of that file. If bindgen is told to output a file, it should output a file, even if that file is empty.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation of the --wrap-static-fns option and trace the output-file decision when no static functions are found. Confirm the existing behavior with a minimal input, then ensure that requesting an output file still produces an empty file when there is nothing to generate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100