Skip to content

Update Eclipse LSP4J from 0.24.0 to 1.0.0#3839

Draft
Copilot wants to merge 3 commits intodevelopfrom
copilot/update-lsp4ij-to-version-1-0
Draft

Update Eclipse LSP4J from 0.24.0 to 1.0.0#3839
Copilot wants to merge 3 commits intodevelopfrom
copilot/update-lsp4ij-to-version-1-0

Conversation

Copy link
Contributor

Copilot AI commented Feb 25, 2026

LSP4J 1.0.0 implements LSP 3.18.0 and removes several deprecated APIs. The primary breaking change affecting this codebase is Diagnostic.getMessage() now returning Either<String, MarkupContent> instead of String.

Dependency bump

  • org.eclipse.lsp4j and org.eclipse.lsp4j.websocket.jakarta: 0.24.01.0.0

Adapt to Diagnostic.message type change

All call sites reading diagnostic.getMessage() now call .getLeft() to extract the string:

// Before
String msg = diagnostic.getMessage();

// After
String msg = diagnostic.getMessage().getLeft();

Affected main sources: MissingSpaceDiagnostic, InvalidCharacterInFileDiagnostic, TSLintReportEntry, JUnitTestSuites, CodeQualityReportEntry, SarifReporter, GenericIssueReport. Same pattern applied across 14 test files and DiagnosticAssert.

Jackson serialization for Either<String, MarkupContent>

Added DiagnosticMessageSerializer / DiagnosticMessageDeserializer (mirroring the existing DiagnosticCodeSerializer / DiagnosticCodeDeserializer) and registered them in DiagnosticMixIn so JSON reporters serialize/deserialize the message as a plain string.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 25, 2026 20:09
- Update lsp4j and lsp4j.websocket.jakarta dependencies to 1.0.0
- Fix Diagnostic.getMessage() calls to use .getLeft() since message type
  changed from String to Either<String, MarkupContent> in lsp4j 1.0
- Fix affected files in main source: MissingSpaceDiagnostic,
  InvalidCharacterInFileDiagnostic, TSLintReportEntry, JUnitTestSuites,
  CodeQualityReportEntry, SarifReporter, GenericIssueReport
- Fix affected test files: all diagnostic tests using getMessage(),
  DiagnosticAssert utility, IdenticalExpressionsDiagnosticTest

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Add DiagnosticMessageSerializer and DiagnosticMessageDeserializer
to handle the new Either<String, MarkupContent> message type in
lsp4j 1.0.0 during JSON (de)serialization, following the same
pattern as DiagnosticCodeSerializer/Deserializer. Update
DiagnosticMixIn to register these for the message field.

Co-authored-by: nixel2007 <1132840+nixel2007@users.noreply.github.com>
Copilot AI changed the title [WIP] Update lsp4ij to version 1.0 Update Eclipse LSP4J from 0.24.0 to 1.0.0 Feb 25, 2026
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