[CI] Add auto run generate_exports.py to pre-commit#23848
[CI] Add auto run generate_exports.py to pre-commit#23848RattataKing merged 4 commits intoiree-org:mainfrom
Conversation
bangtianliu
left a comment
There was a problem hiding this comment.
Thanks, this is very helpful.
kuhar
left a comment
There was a problem hiding this comment.
Looks great, thanks for automating this.
Have you tried adding a new CAPI to see what the output looks like? Could you show an example?
hanhanW
left a comment
There was a problem hiding this comment.
Does it print out how to fix the failure (e.g., running the script) when it fails?
ScottTodd
left a comment
There was a problem hiding this comment.
This does looks appropriate for a pre-commit hook, thanks.
It's included in the pre-commit test, CI will print |
Declare a test sample in Run ...
Regenerate CAPI export files.............................................Failed
- hook id: generate_capi_exports
- files were modified by this hook |
Using the `generate_exports.py` scripts. To resolve ci errors for #23848.
67afd30 to
9926a0b
Compare
It is easy to forget updating C API exports when adding new Python bindings.
This change adds a pre-commit hook that runs
generate_exports.pywhenever header files under compiler/bindings/c/iree/compiler/ are modified.