Closed diivm closed 4 years ago
Solution found:
clang
for development (was using this). Gives weird behaviour for anonymous structs.python3-libclang10
cindex
, since I had used that successfully after swapping with the pip one). This should be the reason why the docker env was giving issues :exploding_head: python3-libclang11
: Gives the same result as the current code.if spelling != ""
condition.
if spelling != ""
, but the extra information can enhance the pybind generation. Needs handling more cursor kinds (a lot), but I feel it will be useful.generate.py
front required (which would have been done anyway).Should have read this before the PR.
We can do something to handle the special case
Maybe the type of node can be used?
the extra information can enhance the pybind generation
In what ways?
Package updation
Clang 11 is not released. That's my opposition against moving to 11. What about clang-9?
Maybe the type of node can be used?
Yeah, was doing just that.
In what ways?
Adds more type info like type of array, etc. Anyway, later if not needed, can just add a skip for those types so that it doesn't go in the json in the first place.
Clang 11 is not released. That's my opposition against moving to 11. What about clang-9?
Yeah, I am aware. On further digging, the problem is with the .so
file cindex.py
uses. I tried both libclang-10.so
and libclang-11.so
with both python3-clang-10
and python3-clang-11
(modifying the cindex file). libclang-11.so
works in both cases, libclang-10.so
doesn't.
clang-9:
libclang-10.so
, libclang-9.so
doesn't work.Also, now v12 is under development:
Sorry for the shoddy research. Didn't expect LLVM's release page to be stale
python3-clang-9
Nor is python3-clang-11
Yeah, we'll have to use the nightly package:
The default version of clang still goes to v6, I'm not sure though. Nightly packages from https://apt.llvm.org/ shows that they have defaulted to v11:
@aPonza, python-clang-9
installs for python2.7
➜ bindings git:(devel/test_parse) ✗ dpkg -L python-clang-9
/.
/usr
/usr/lib
/usr/lib/python2.7
/usr/lib/python2.7/dist-packages
/usr/lib/python2.7/dist-packages/clang
/usr/lib/python2.7/dist-packages/clang/__init__.py
/usr/lib/python2.7/dist-packages/clang/cindex.py
/usr/lib/python2.7/dist-packages/clang/enumerations.py
/usr/share
/usr/share/doc
/usr/share/doc/python-clang-9
/usr/share/doc/python-clang-9/NEWS.Debian.gz
/usr/share/doc/python-clang-9/changelog.Debian.gz
/usr/share/doc/python-clang-9/copyright
if cursor.spelling
check, which leads to empty names not being parsed.cursor.is_anonymous()
for the special case.