Describe the bug
The ltex-cli-plus bundled by a current develop build is binary-incompatible with the LSP4J 1.0.0 jars in the same target/appassembler/lib directory. It receives diagnostics from the language server, then crashes while printing the first one:
java.lang.NoSuchMethodError: 'java.lang.String org.eclipse.lsp4j.Diagnostic.getMessage()'
at org.bsplines.lspcli.client.Checker$Companion.printDiagnostic(Checker.kt:197)
This started after the LSP4J 1.0.0 update in #197. tools/addLtexCli.py currently bundles lsp-cli-plus 2.3.0, which was compiled against the older Diagnostic#getMessage(): String API. LSP4J 1.0.0 changed that method to return Either<String, MarkupContent>.
Without --verbose, this can look like an indefinite hang because the CLI main thread throws while its spawned language-server process remains alive.
Steps to reproduce
-
Check out current develop (d8894449 when reproduced).
-
Run mvn -DskipTests package.
-
Create /tmp/ltex-minimal.typ:
Why is ltex not showing anithing?
thisfh fhsdh gh.
-
Run:
target/appassembler/bin/ltex-cli-plus --verbose /tmp/ltex-minimal.typ
-
The server checks the file and sends diagnostics, but the CLI throws NoSuchMethodError when it tries to print one.
For comparison, building commit 7721b75d (immediately before the LSP4J update) and running its packaged CLI against the same file prints five diagnostics and exits with status 3 as expected.
Expected behavior
The packaged CLI should print the diagnostics and exit with status 3.
Sample document
Details
Why is ltex not showing anithing?
thisfh fhsdh gh.
LTeX configuration
Details
LTeX LS log
Details
INFO: Checking '/tmp/ltex-minimal.typ'...
INFO: Waiting for diagnostics for file '/tmp/ltex-minimal.typ'...
Exception in thread "main" java.lang.NoSuchMethodError: 'java.lang.String org.eclipse.lsp4j.Diagnostic.getMessage()'
at org.bsplines.lspcli.client.Checker$Companion.printDiagnostic(Checker.kt:197)
at org.bsplines.lspcli.client.Checker.checkFile(Checker.kt:136)
at org.bsplines.lspcli.client.Checker.check(Checker.kt:67)
at org.bsplines.lspcli.client.Checker.check(Checker.kt:40)
at org.bsplines.lspcli.LspCliLauncher.call(LspCliLauncher.kt:184)
Version information
- Operating system: Fedora Linux 44, x86-64
- ltex-ls-plus:
develop at d8894449
- bundled lsp-cli-plus: 2.3.0
- LSP4J: 1.0.0
- Java: OpenJDK 25.0.4
Additional context/information
The language server itself does publish valid textDocument/publishDiagnostics JSON. A direct protocol probe receives all five diagnostics, with Diagnostic.message serialized as a string. The failure is in the packaged Java CLI reading the LSP4J 1.0.0 model at runtime.
Describe the bug
The
ltex-cli-plusbundled by a currentdevelopbuild is binary-incompatible with the LSP4J 1.0.0 jars in the sametarget/appassembler/libdirectory. It receives diagnostics from the language server, then crashes while printing the first one:This started after the LSP4J 1.0.0 update in #197.
tools/addLtexCli.pycurrently bundleslsp-cli-plus2.3.0, which was compiled against the olderDiagnostic#getMessage(): StringAPI. LSP4J 1.0.0 changed that method to returnEither<String, MarkupContent>.Without
--verbose, this can look like an indefinite hang because the CLI main thread throws while its spawned language-server process remains alive.Steps to reproduce
Check out current
develop(d8894449when reproduced).Run
mvn -DskipTests package.Create
/tmp/ltex-minimal.typ:Run:
The server checks the file and sends diagnostics, but the CLI throws
NoSuchMethodErrorwhen it tries to print one.For comparison, building commit
7721b75d(immediately before the LSP4J update) and running its packaged CLI against the same file prints five diagnostics and exits with status 3 as expected.Expected behavior
The packaged CLI should print the diagnostics and exit with status 3.
Sample document
Details
LTeX configuration
Details
{}LTeX LS log
Details
Version information
developatd8894449Additional context/information
The language server itself does publish valid
textDocument/publishDiagnosticsJSON. A direct protocol probe receives all five diagnostics, withDiagnostic.messageserialized as a string. The failure is in the packaged Java CLI reading the LSP4J 1.0.0 model at runtime.