Skip to content

ci: align Java test runtime with latest pre-release tooling#1882

Merged
wenytang-ms merged 4 commits into
mainfrom
fix/pin-jdtls-target-platform
Jul 8, 2026
Merged

ci: align Java test runtime with latest pre-release tooling#1882
wenytang-ms merged 4 commits into
mainfrom
fix/pin-jdtls-target-platform

Conversation

@wenytang-ms

@wenytang-ms wenytang-ms commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Problem

CI was failing in the VS Code extension test step after installing the latest redhat.java --pre-release.

The failing tests all called JDT LS delegate commands from the Java test plugin and failed with errors such as:

No delegateCommandHandler for vscode.java.test.junit.argument
No delegateCommandHandler for vscode.java.test.navigateToTestOrTarget
No delegateCommandHandler for vscode.java.test.findTestLocation

This means the Java test plugin bundle was not resolved/loaded into the JDT LS runtime used by the latest Red Hat Java pre-release.

Root cause

CI intentionally installs rolling Java pre-release tooling:

redhat.java --pre-release
vscjava.vscode-java-debug --pre-release

The latest redhat.java pre-release moved to a newer JDT LS / dependency stack. The target platform and packaged server jars therefore need to remain compatible with that rolling stack.

The new stack exposes a few dependency-resolution issues:

  • JUnit 5 and JUnit 6 bundles with the same symbolic names now coexist in the target platform.
  • In OSGi, bundle-version="5.14.0" is a lower bound, not an exact version, so JUnit 5 requirements can accidentally match JUnit 6 bundles.
  • The latest JDT LS stack includes ASM 9.10.1, while JaCoCo 0.8.14 requires ASM < 9.10.
  • Some JUnit 5 runtime bundles need to be made explicit so the generated server/ content stays version-consistent.

Fix

Keep CI tracking latest Java pre-release tooling, and make the target platform/runtime explicit enough to resolve consistently:

  • Keep the JDT LS target platform on https://download.eclipse.org/jdtls/snapshots/repository/latest/.
  • Add explicit OSGi version ranges so JUnit 5 requirements stay on the 5.x / 1.x line and JUnit 6 requirements stay on the 6.x line.
  • Add explicit JUnit 5 runtime support bundles (junit-jupiter-migrationsupport, Vintage, Platform runner/suite bundles) at the current 5.14.4 / 1.14.4 line.
  • Update JaCoCo core/agent to 0.8.15, which supports ASM 9.10.1.
  • Regenerate contributes.javaExtensions from the built server/ artifacts.

The test runner still installs redhat.java --pre-release and vscjava.vscode-java-debug --pre-release, so CI continues to catch future breakages from upstream pre-release changes.

Verification

Local verification:

npm run build-plugin
npm test   # fresh .vscode-test/extensions; installs redhat.java v1.56.2026070709

PR CI is green on Linux, Windows, and macOS.

The rolling 'jdtls/snapshots/repository/latest/' snapshot drifted: newer jdt.ls builds inconsistently bundle junit-platform-* jars (currently 1.14.x / jupiter 5.14.x) that conflict with the JUnit 6 (6.0.x) stack the plugin manifest requires, breaking OSGi resolution during 'Build OSGi bundle' (mvnw clean verify).

Pin to 1.55.0.202512042336 (the last snapshot before jdt.ls started bundling junit-platform-*, and the build used when JUnit 6 support landed in #1820). With this pin the entire JUnit stack resolves consistently from the Eclipse 4.38 / 2025-12 platform: JUnit 5 (platform 1.14.1 + jupiter 5.14.1), JUnit 4 (vintage 5.14.1) and JUnit 6 (6.0.1) are all present, so no runtime regression.

Regenerate contributes.javaExtensions accordingly: the 1.14.x/5.14.x bundles now come from Eclipse (1.14.1/5.14.1) instead of jdt.ls (1.14.4/5.14.4); asm 9.9.0. Verified locally: 'npm run build-plugin' -> BUILD SUCCESS and 'git diff --exit-code package.json' is clean after regeneration.
@wenytang-ms
wenytang-ms force-pushed the fix/pin-jdtls-target-platform branch from bd36059 to 6cc5749 Compare July 7, 2026 08:17
@wenytang-ms wenytang-ms changed the title build: pin jdt.ls target platform to fix CI resolution failure ci: pin jdt.ls target platform to fix CI resolution failure Jul 8, 2026
@wenytang-ms wenytang-ms changed the title ci: pin jdt.ls target platform to fix CI resolution failure ci: align Java test runtime with latest pre-release tooling Jul 8, 2026
@wenytang-ms
wenytang-ms merged commit 33e1424 into main Jul 8, 2026
5 checks passed
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.

2 participants