Skip to content

fix: ship org.objectweb.asm bundles to satisfy Jacoco 0.8.14 (#1866)#1872

Merged
wenytang-ms merged 2 commits into
mainfrom
fix/ship-asm-bundle-1866
Jun 8, 2026
Merged

fix: ship org.objectweb.asm bundles to satisfy Jacoco 0.8.14 (#1866)#1872
wenytang-ms merged 2 commits into
mainfrom
fix/ship-asm-bundle-1866

Conversation

@wenytang-ms

@wenytang-ms wenytang-ms commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #1803

Fixes #1866

Problem

Issue #1866 (CherryDT's follow-up): after upgrading both vscode-java and vscode-java-test to pre-release, the test plugin fails to load with:

Could not resolve module: com.microsoft.java.test.plugin
  Unresolved requirement: Require-Bundle: org.objectweb.asm; bundle-version="[9.9.0,9.10.0)"
Could not resolve module: org.jacoco.core
  Unresolved requirement: Import-Package: org.objectweb.asm; version="[9.9.0,9.10.0)"

No test UI appears.

Root cause

  • fix - Update to Jacoco 0.8.14 #1798 bumped Jacoco 0.8.12 -> 0.8.14 and the asm requirement [9.8.0,9.9.0) -> [9.9.0,9.10.0) in MANIFEST.MF.
  • The Eclipse platform / JDT-LS provided by vscode-java only ships org.objectweb.asm 9.8.0.
  • scripts/buildJdtlsExt.js has a bundleList allow-list that controls which bundles get copied into server/ and registered as contributes.javaExtensions. It contains org.jacoco.core_ but no asm, so asm 9.9 was never shipped with the extension.
  • The build/CI target platform does include asm 9.9 (pulled transitively via the Maven target location), so all internal tests passed and the gap stayed hidden. It only surfaces at end-user runtime against a platform that provides a different asm version.

Before #1798 the requirement [9.8.0,9.9.0) matched the platform's 9.8.0, so asm never needed to be shipped.

Fix

Add the org.objectweb.asm prefix to bundleList. This ships org.objectweb.asm, org.objectweb.asm.commons and org.objectweb.asm.tree (9.9.1) with the extension ΓÇö the broad prefix is required because Jacoco 0.8.14 also imports asm.commons/asm.tree. The asm requirement is now satisfied independently of the platform-provided asm version.

package.json javaExtensions is regenerated by the build to include the three asm jars.

Verification

  • node scripts/buildJdtlsExt.js succeeds; server/ now contains org.objectweb.asm_9.9.1.jar, org.objectweb.asm.commons_9.9.1.jar, org.objectweb.asm.tree_9.9.1.jar.
  • package.json updated accordingly.

Fixes the BundleException reported in #1866 and redhat-developer/vscode-java#4396.

The plugin and bundled Jacoco 0.8.14 require org.objectweb.asm
[9.9.0,9.10.0), but the Eclipse platform/JDT-LS provided by vscode-java
only ships asm 9.8.0. Since #1798 bumped Jacoco to 0.8.14 (asm 9.9) the
asm bundle was never added to the copy allow-list in buildJdtlsExt.js,
so it was never shipped in server/ nor registered in javaExtensions.

At runtime this leaves com.microsoft.java.test.plugin and
org.jacoco.core unresolved (BundleException: Unresolved requirement:
org.objectweb.asm [9.9.0,9.10.0)), so the test plugin fails to load and
no test UI appears.

Add the org.objectweb.asm prefix to bundleList so asm, asm.commons and
asm.tree 9.9.x are shipped with the extension and the requirement is
satisfied independently of the platform-provided asm version.

Co-authored-by: Copilot <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses an end-user runtime OSGi resolution failure after upgrading JaCoCo to 0.8.14 by ensuring the required org.objectweb.asm bundles are shipped with the extension (rather than relying on the Eclipse/JDT-LS platform’s bundled ASM version).

Changes:

  • Extend scripts/buildJdtlsExt.js bundle allow-list to copy ASM bundles into server/ during the build.
  • Update package.json contributes.javaExtensions to include the shipped ASM jars (asm, asm.commons, asm.tree).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/buildJdtlsExt.js Adds ASM to the build allow-list so required bundles are copied into server/ and included in regenerated javaExtensions.
package.json Registers the newly shipped ASM jars as contributes.javaExtensions so they’re available at runtime.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/buildJdtlsExt.js
Address review feedback: bundleList prefixes are matched with
startsWith, so the bare 'org.objectweb.asm' prefix could also match
unrelated bundles like org.objectweb.asm.source_*. List the three
bundles Jacoco 0.8.14 actually requires (asm, asm.commons, asm.tree)
explicitly with the underscore delimiter, consistent with the other
entries. Verified this is the complete closure: asm.commons/asm.tree
import only asm, asm.tree and asm.signature (the latter is exported by
the base asm bundle); nothing imports asm.analysis.

Co-authored-by: Copilot <[email protected]>
@wenytang-ms wenytang-ms merged commit 2d9b54d into main Jun 8, 2026
5 checks passed
@wenytang-ms wenytang-ms deleted the fix/ship-asm-bundle-1866 branch June 8, 2026 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants