Skip to content

Remove fragile explicit import that breaks with jextract/CUDA changes#2124

Open
imotov wants to merge 1 commit into
rapidsai:mainfrom
imotov:issue-2123-improve-java-build-robustness
Open

Remove fragile explicit import that breaks with jextract/CUDA changes#2124
imotov wants to merge 1 commit into
rapidsai:mainfrom
imotov:issue-2123-improve-java-build-robustness

Conversation

@imotov
Copy link
Copy Markdown

@imotov imotov commented May 25, 2026

There is no guarantee that any particular declaration will end up in headers_h vs headers_h_1 due to the unstable nature of that split. An explicit import of cudaStreamSynchronize is unnecessary since headers_h inherits from headers_h_1, and therefore that function is already covered by the wildcard import.

Fixes #2123

… changes

There is no guarantee that any particular declaration will end up in
`headers_h` vs `headers_h_1` due to the unstable nature of that
split. An explicit import of `cudaStreamSynchronize` is unnecessary
since `headers_h` inherits from `headers_h_1`, and therefore that
function is already covered by the wildcard import.

Fixes rapidsai#2123
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 25, 2026

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.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 02e1e9f3-5499-4da2-a8e5-3eb9d6446e6e

📥 Commits

Reviewing files that changed from the base of the PR and between 4addf4e and 9ef996c.

📒 Files selected for processing (1)
  • java/cuvs-java/src/main/java22/com/nvidia/cuvs/spi/JDKProvider.java
💤 Files with no reviewable changes (1)
  • java/cuvs-java/src/main/java22/com/nvidia/cuvs/spi/JDKProvider.java

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Simplified import organization in the Java provider module.

Note: This release contains no visible end-user changes; it is a code maintenance update.

Walkthrough

This PR removes a redundant static import statement from JDKProvider.java. The explicit import of cudaStreamSynchronize from headers_h_1 is unnecessary since headers_h is already wildcard-imported and extends headers_h_1, making all inherited static members available. This resolves build failures caused by unstable symbol placement across jextract versions.

Changes

Import Statement Cleanup

Layer / File(s) Summary
Remove redundant static import
java/cuvs-java/src/main/java22/com/nvidia/cuvs/spi/JDKProvider.java
Removes the explicit static import of cudaStreamSynchronize from headers_h_1, relying on the existing wildcard import from headers_h which already covers inherited static members through class inheritance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Suggested labels

improvement, non-breaking

Suggested reviewers

  • bdice
  • cjnolet
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing an explicit import that causes fragility with jextract/CUDA changes.
Description check ✅ Passed The description clearly explains why the explicit import is unnecessary and references the issue being fixed.
Linked Issues check ✅ Passed The code change directly addresses issue #2123 by removing the fragile explicit import of cudaStreamSynchronize, making the build robust across different CUDA/jextract versions.
Out of Scope Changes check ✅ Passed The change is focused and in-scope: it only removes one unnecessary import line from JDKProvider.java as specified in the linked issue.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[BUG] cuVS Java API may fail to build on some systems

1 participant