Repository navigation
fix: open a file at a starting language server with the edits made while it started - #2127
Merged
lagergren merged 1 commit intoNov 23, 2026
Conversation
…ile it started Fixes redhat-developer#2126 LanguageServiceAccessor captures a document's text and stamp for the didOpen when it asks for the connection, and the document's DocumentContentSynchronizer listens to it only once the server has initialized. The didOpen sent the captured text, so the server never got an edit made in between, and with incremental sync each later change applied to text it didn't have. The didOpen now uses the captured text only while the document still has the captured stamp, and otherwise reads the current text, as when no text was captured. It reads only after such a change, so a didOpen whose text is current still doesn't wait for read access (redhat-developer#878). A versioned workspace edit for the version of that didOpen now applies, since the version describes the current text: WorkspaceEditVersionTest's test of the refusal now checks that. Not changed: a change that is under way while the listener is added, before it updates the stamp, is still missed. ChangeDuringConnectionTest (new) captures the connection info of a file, changes the document, and connects the file. On main the didOpen has the old text.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2127 +/- ##
=======================================
Coverage 50.66% 50.67%
=======================================
Files 816 816
Lines 33910 33911 +1
Branches 5290 5290
=======================================
+ Hits 17180 17183 +3
+ Misses 14066 14060 -6
- Partials 2664 2668 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 23, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
Collaborator
Author
|
@coderabbitai review |
Action performed
|
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 23, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 23, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 23, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 25, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 26, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 27, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 27, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 27, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 27, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 28, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 28, 2026
UP83, an edit made while LSP4IJ connects a file to a starting language server that never reaches the server, is now filed as redhat-developer/lsp4ij#2126. Our redhat-developer/lsp4ij#2127 makes the didOpen read the current text when the document changed after the capture. The row's gate becomes a release with #2127, after which the tour's kill step no longer needs to wait for the new server to have the file open. Validation of #2127: its new test fails on unchanged main on 2024.2, 2025.3 and IU 2026.3, and passes with the fix. The affected test classes pass on 2025.3 and 2026.3 (51 tests each), and the full 2024.2 suite passes (1865 tests, 0 failures, 7 skipped). Limits: #2127 leaves a change that is under way while the document's listener is added, before it updates the stamp. A guard for it worked only on 2024.2 and 2025.3, since 2026.3 takes a change's listeners once for both its events, so the PR names the window instead. #741 got its rows the same day.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 28, 2026
…or LSP4IJ 0.30.2 LSP4IJ merged #2127 on 2026-11-23 as 0f8c24c3, on milestone 0.30.2, which closed #2126. No release has it yet; the row's gate, a release with it and then the tour's wait going, is unchanged.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 28, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 29, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 29, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 30, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Nov 30, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
lagergren
added a commit
to xtclang/xvm
that referenced
this pull request
Dec 1, 2026
…the reviewed LSP4IJ internal APIs (UP83) LanguageServerLifecycleListener is @ApiStatus.Internal in LSP4IJ 0.30.1, and c835be1's OpenedTextRepair implements it, so verifyPluginInternalApis failed #693's CI (run 45227493817): the interface and the three methods it overrides were not in verifier-lsp4ij-apis.txt. They are now, with why OpenedTextRepair needs them and when they go: with it, once a release has redhat-developer/lsp4ij#2127. The validation of c835be1 compiled the plugin and ran the tour, but not this check, which only `check` runs. Validated: :lang:intellij-plugin:verifyPlugin and verifyPluginInternalApis pass locally.
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.
Fixes #2126
What
An edit made while a file connected to a starting language server never reached the server. The server kept the text from before the edit, and with incremental sync each later change applied to text it didn't have.
Cause
LanguageServiceAccessorcaptures the document's text and modification stamp for thedidOpenwhen it asks for the connection (createFileConnectionInfo).LanguageServerWrapper.connectDocumentadds theDocumentContentSynchronizeras the document's listener only once the server has initialized.didOpensent the captured text, and no listener had heard the edits made in between.Change
getDidOpenFutureSyncuses the captured text only while the document still has the captured stamp (changedSinceCapture). Otherwise it reads the current text, as when no text was captured, and drops the changes queued since the listener was added: the text it reads contains them.Why the
didOpenreads only after a change:didOpendoesn't wait for read access (Freeze when language server is started from the EDT #878). The read of a pooled thread waits for a running write action. ThedidOpennow reads only when the document changed after the capture.LSPFileListener.reconnectMovedDocument), so a move's write action doesn't wait for that read.isCurrentTextAssigned(fix: validate document versions before applying workspace edits #1698) compares, without read access. IntelliJ publishes it through a volatile field (2024.2, 2025.3) or a volatile snapshot (2026.3).Behavior changes
didOpen.didOpenis now applied, since that version describes the current text.WorkspaceEditVersionTest.testDidOpenVersionCannotAuthorizeTextChangedSinceCapturechecked the refusal. It is nowtestDidOpenVersionAuthorizesTextChangedSinceCapture, and checks that the edit applies.Not changed
A change that is under way while the listener is added, and hasn't updated the stamp when the
didOpencompares it, is still missed. The window is the dispatch of one change. On 2024.2 and 2025.3 the listener then hears only the change'sdocumentChanged, which queues no incremental change. On 2026.3, which takes the listeners once for both events, it hears neither. Closing it would need a check under read access after each connection.Test
ChangeDuringConnectionTest.testDidOpenSendsTheChangeMadeSinceTheCapture(new) uses incremental sync. It captures the connection info of a file, changes the document, and then connects the file. Onmainit fails:expected:<[new typing]> but was:<[before]>.mainChangeDuringConnectionTest,WorkspaceEditVersionTest,DocumentLifecycleTest,NotificationOrderTest,FileDocumentMoveTestwith the fix