-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing docstrings depending on include path #1265
Comments
I can confirm similarly weird behavior with bindgen 0.53.2: strohel@mat480s ~/projekty/isds-rs/isds-sys $ cat wrapper.h
#include <isds.h>
strohel@mat480s ~/projekty/isds-rs/isds-sys $ bindgen wrapper.h -- -I /usr/include/libxml2 | grep '#\[doc' | wc -l
0
strohel@mat480s ~/projekty/isds-rs/isds-sys $ bindgen /usr/include/isds.h -- -I /usr/include/libxml2 | grep '#\[doc' | wc -l
689 I.e. it generates documentation only if It is interesting that documentation for libXml types is generated in the second case, even if it comes from It seems that bindgen skips docstrings of transitive header files (not directly specified) that are directly in the default include path |
Okay, I've drilled it down to clang. Thanks to these slides https://llvm.org/devmtg/2012-11/Gribenko_CommentParsing.pdf - namely slide 32:
And indeed, passing that causes much more (too much?) comments to be extracted: strohel@mat480s ~/projekty/isds-rs/isds-sys $ bindgen wrapper.h -- -I /usr/include/libxml2 -fretain-comments-from-system-headers | grep '#\[doc' | wc -l
2614 |
Another note (to myself, mostly): there is also |
Awesome find! It'd be good to document these, I've seen a couple people ask for the ability to generate non-doxygen comments. |
Cool, expect a docs PR from me in a couple of days. |
Sorry for not having a minimal example, but this should show the issue. I'm running it on Arch Linux with the
gdal
package installed.Is there anything I should be aware of when choosing the
bindgen
input and include paths?The text was updated successfully, but these errors were encountered: