Repository navigation
fix: force load of language server settings in the lsp console factory - #991
Merged
angelozerr merged 1 commit intoApr 24, 2025
Merged
Conversation
angelozerr
force-pushed
the
lsp_settings_force_loading
branch
2 times, most recently
from
April 24, 2025 08:52
15bf365 to
4a6e935
Compare
Signed-off-by: azerr <[email protected]>
angelozerr
force-pushed
the
lsp_settings_force_loading
branch
from
April 24, 2025 09:16
4a6e935 to
db9734f
Compare
This was referenced Oct 19, 2026
angelozerr
pushed a commit
that referenced
this pull request
Oct 19, 2026
Fixes #1722. Two bugs together kept the diagnostics of related documents from ever being applied: - LSP4J 1.0.0 cannot parse a textDocument/diagnostic reply with relatedDocuments: "Ambiguous Either type: token BEGIN_OBJECT matches both alternatives" (eclipse-lsp4j/lsp4j#990, fixed in eclipse-lsp4j/lsp4j#991, not yet released). In LSP4IJ's test harness such a pull never completed. - DocumentContentSynchronizer.refreshPullDiagnostic applied relatedDocuments only for an unchanged report, and dropped them from a full one. refreshPullDiagnostic now applies the related documents of both report kinds, through updateRelatedPullDiagnostics. RelatedDocumentsTypeAdapterFactory, registered in JSONUtils.configureCompatibilityAdapters beside the other LSP4J compatibility adapters, reads each relatedDocuments value by its kind, as LSP4J does for the report itself. It only matches the exact field type, so LSP4J's own field adapter takes precedence once LSP4IJ uses a release with #991, and the factory can then be removed. Validation: - New PullRelatedDocumentsTest: the mock answers the opened file's pull with a full report, and in a second test an unchanged one. Each carries diagnostics for a second, closed file, which must be stored. - New RelatedDocumentsSerializationTest round-trips such a textDocument/diagnostic response through MessageJsonHandler with configureCompatibilityAdapters. - With neither part, or with only the handling fix, all three tests fail. With only the adapter, the unchanged-report and serialization tests pass and the full-report test fails. With both, all pass. - ./gradlew check: 579 tests, 0 failures, 3 existing skips. Signed-off-by: Marcus Lagergren <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: force load of language server settings in the lsp console factory