Skip to content

Delete stale Panama bindings instead of generating on top of them - #2511

Merged
rapids-bot[bot] merged 7 commits into
NVIDIA:mainfrom
imotov:delete-panama-files-during-clean
Aug 29, 2026
Merged

Delete stale Panama bindings instead of generating on top of them#2511
rapids-bot[bot] merged 7 commits into
NVIDIA:mainfrom
imotov:delete-panama-files-during-clean

Conversation

@imotov

@imotov imotov commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

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.

`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.
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@imotov

imotov commented Aug 26, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 016c9ba

@imotov imotov self-assigned this Aug 26, 2026
@imotov imotov added improvement Improves an existing functionality non-breaking Introduces a non-breaking change Build labels Aug 26, 2026
@imotov

imotov commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 28a2fb6

@imotov

imotov commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test becdbb2

@imotov

imotov commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test a18f3f9

@imotov
imotov marked this pull request as ready for review August 28, 2026 15:03
@imotov
imotov requested review from a team as code owners August 28, 2026 15:03
@imotov
imotov requested a review from bdice August 28, 2026 15:03

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay bash arrays instead of space-delimited strings! Approved.

@imotov

imotov commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 611b6f1

@imotov

imotov commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 35a398f

@imotov

imotov commented Aug 29, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit 0dd9693 into NVIDIA:main Aug 29, 2026
169 of 171 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants