-
Notifications
You must be signed in to change notification settings - Fork 38
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
When generating .pxd, warn for public but unexported functions #563
Comments
That's a great point! The .pxd generator is really helpful but pretty wild: arrow-nanoarrow/python/bootstrap.py Lines 24 to 170 in fcf3a80
The functions that are included in the .pxd match a very narrow regex that only includes declarations (not definitions). I forget exactly why this happened but I think allowing it to end with something other than When the .pxd generator was written we had more constraints than we do now: we used to allow downloading a pre-concatenated nanoarrow.h/c to support installing from github when CMake wasn't installed, but now we have nightly builds and the concatenator is written in Python. We could now probably use pycparser to find declarations or definitions (pure Python is preferable because Windows). |
Not sure if there's an appetite for the work in #669 but it looks like the autopxd2 library might avoid this issue |
It's possible to add a function to
inline_array.h
or other header included bynanoarrow.h
which is nevertheless not included in generated.pxd
. The error is then simply "no matching function" when compiling the.pxd
, which is not informative. It'd be better if the pxd could recognize function definitions or declarations which aren't translatable into acdef
, then warn if those aren't on an exclusion list.The text was updated successfully, but these errors were encountered: