Delete stale Panama bindings instead of generating on top of them - #2511
Draft
imotov wants to merge 3 commits into
Draft
Delete stale Panama bindings instead of generating on top of them#2511imotov wants to merge 3 commits into
imotov wants to merge 3 commits into
Conversation
`jextract` overwrites the files it generates but never removes them, so a binding for a symbol that was renamed or dropped from the C headers survives in `java/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/panama/` and keeps compiling into the jar. The stale class then disagrees with `libcuvs_c.so`, producing confusing errors that go away only after deleting the directory by hand. Makes `java/panama-bindings/generate-bindings.sh` remove the target package directory before invoking `jextract`. Also adds the two directories `java/build.sh` produces — `java/internal/build` and the generated `panama` package — to `BUILD_DIRS`, so `./build.sh clean` leaves the tree pristine without requiring a subsequent build.
Contributor
Author
|
/ok to test 016c9ba |
Contributor
Author
|
/ok to test 28a2fb6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
jextractoverwrites the files it generates but never removes them, so a binding for a symbol that was renamed or dropped from the C headers survives injava/cuvs-java/src/main/java22/com/nvidia/cuvs/internal/panama/and keeps compiling into the jar. The stale class then disagrees withlibcuvs_c.so, producing confusing errors that go away only after deleting the directory by hand.Makes
java/panama-bindings/generate-bindings.shremove the target package directory before invokingjextract. Also adds the two directoriesjava/build.shproduces —java/internal/buildand the generatedpanamapackage — toBUILD_DIRS, so./build.sh cleanleaves the tree pristine without requiring a subsequent build.