Skip to content

Conversation

makslevental
Copy link
Contributor

@makslevental makslevental commented Aug 28, 2025

This PR turns on automatic type stub generation (rather than relying on hand-written/updated stubs). It uses nanobind's stubgen facility.

Note, the only catch is we need a quite recent version of that code - specifically we need a commit of nanobind that includes wjakob/nanobind@53dce4e. In conventional requirements.txt files it's no issue to depend directly on a GitHub git commit (which I've done for mlir/python/requirements.txt) but such dependencies don't support pip hash (ironically). To workaround this I've temporarily updated .ci/monolithic-linux.sh and .ci/monolithic-windows.sh to explicitly install the appropriate commit of nanobind for our CI. When nanobind does its next PyPI release (which will contain the required 53dce4e commit), I'll update mlir/python/requirements.txt and .ci/all_requirements.txt and restore the monolithic scripts.

@makslevental makslevental force-pushed the users/makslevental/stubgen branch 4 times, most recently from 12b9b37 to b91ae20 Compare August 28, 2025 06:26
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from b91ae20 to 7994333 Compare August 28, 2025 06:28
@makslevental makslevental force-pushed the users/makslevental/stubgen branch 15 times, most recently from aa2edbf to 7dab1af Compare August 29, 2025 03:00
@makslevental makslevental force-pushed the users/makslevental/stubgen branch 2 times, most recently from b7bbc85 to 44d8b56 Compare August 30, 2025 03:06
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from 44d8b56 to 0dc58fc Compare August 30, 2025 03:26
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from ba41789 to 4c67ba3 Compare August 30, 2025 13:47
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from 1163c12 to 4df87ae Compare August 30, 2025 15:46
makslevental added a commit that referenced this pull request Aug 31, 2025
Fix some things in `standalone` in order to unblock
#155741.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Aug 31, 2025
@makslevental makslevental force-pushed the users/makslevental/stubgen branch 4 times, most recently from 010201c to 9fe2cb4 Compare September 2, 2025 03:23
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from 9fe2cb4 to 386009c Compare September 2, 2025 14:26
@makslevental makslevental force-pushed the users/makslevental/stubgen branch from 386009c to 62a9f40 Compare September 2, 2025 14:45
@makslevental makslevental marked this pull request as ready for review September 2, 2025 15:06
@makslevental
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant