Skip to content

Give a parameter with a name and no type its extent, as its start already has - #836

Merged
lagergren merged 1 commit into
masterfrom
lagergren/parameter-end-position
Nov 30, 2026
Merged

lagergren merged 1 commit into
masterfrom
lagergren/parameter-end-position

Conversation

@lagergren

@lagergren lagergren commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Started crashing when working with ranges in the Language Server, but the bug has always been there.

Why

Parameter.getEndPosition dereferenced the type whenever the parameter had no default value, so a parameter with a name and no type threw a NullPointerException. getStartPosition, right above it, already handled that case.

Such parameters are common: every type parameter without extends is one (class Box<Element>), and the parser also keeps some from damaged declarations. Tools that ask AST nodes for their extent hit it; the language server's selection ranges and outline do.

How

getEndPosition now takes the name's end when there is no type, mirroring getStartPosition.

Validation

  • New test: ParserTest.testParameterWithoutTypeHasAnExtent parses a module with class Box<Element> and requires the type parameter's extent to be its name's. With master's Parameter.java it fails with the NullPointerException at getEndPosition. With the fix, ParserTest has 10 tests, 0 skipped, 0 failures.
  • Gates: spotlessCheck and :javatools:javadoc pass.

Fixes #835

…eady has

Parameter.getEndPosition dereferenced the type whenever the parameter had no default value, so a
parameter with a name and no type threw a NullPointerException. getStartPosition, right above it,
already handled that case. Every type parameter without "extends" is such a parameter (class
Box<Element>), and so are some that the parser keeps from damaged declarations. Tools that ask nodes
for their extent, such as the language server's selection ranges and outline, hit it.

getEndPosition now takes the name's end when there is no type, as getStartPosition takes the name's
start.

Validation:
- ParserTest.testParameterWithoutTypeHasAnExtent parses a module with class Box<Element> and
  requires the type parameter's extent to be its name's. With master's Parameter.java it fails with
  the NullPointerException at Parameter.getEndPosition; with the fix ParserTest has 10 tests, 0
  skipped, 0 failures (JUnit XML).
- spotlessCheck and :javatools:javadoc pass.

Fixes #835
lagergren added a commit that referenced this pull request Nov 30, 2026
…analysis keeps no compile

An analysis kept each document's compiled syntax tree, which refers to the compile's structures,
and through them to the compile's own copies of ecstasy, the turtle and every module it imports:
about 11 MB for each open module, however small, kept as long as one of its documents is open, or
as a closed module's analysis answers queries. Of the tree, the features read only the text
(semantic tokens, document links), the folding regions and the spans that a selection expands
through; everything else they read comes from the semantic models, which are detached already.

XdkAst.outline copies those out as the analysis is made, into XdkOutline: the text, the blocks'
and the imports' folding regions, and a tree of spans that keeps, for each node, the children that
XdkAst.chainAt stepped into: those of the document's own source, within the node's span. Folding
and selection read the outline as they read the tree, so their answers are the same, but for one
case, which threw before.

Parameter.getEndPosition throws a NullPointerException for a parameter with a name and no type
(xvm#835, fixed by #836), and every type parameter without `extends` is one:
Parser.parseTypeParameterList gives the Element of `class Box<Element>` no type. XdkAst.chainAt
read the span of each child of every node on a selection's path, so on errs a selection anywhere
inside such a class failed, at the type parameter and in the class's body alike: the server logged
"textDocument/selectionRange: request failed" and the client got the JSON-RPC error "Internal
error.". The outline gives such a parameter its name's extent, which is what the javatools fix
gives, under a TODO to use the plain getters once errs has it. A new XdkAdapterTest test selects
at Element in `class Box<Element>`: the innermost range is the name, and each step out is strictly
larger, up to the module.

ServerMemoryProbe, live objects in the dumps, after the previous commit and after this one:

  N   shape  last open           all open, rebuilt    mid-build
  2   chain   64.7 -> 49.2 MB     78.9 -> 52.0 MB     106.5 -> 68.1 MB
  2   fan     64.9 -> 49.4 MB     79.1 -> 52.2 MB     106.6 -> 68.3 MB
  10  chain   65.7 -> 49.8 MB    173.6 -> 52.9 MB     202.0 -> 69.4 MB
  10  fan     65.5 -> 50.0 MB    172.0 -> 53.0 MB     199.7 -> 69.1 MB
  30  chain   68.0 -> 50.9 MB    426.0 -> 55.1 MB     456.7 -> 72.8 MB
  30  fan     66.6 -> 51.1 MB    404.0 -> 54.7 MB     431.7 -> 70.9 MB

An open module of two classes now costs about 40 KB, the 400-class module about 4.1 MB, mostly
its semantic models; before, 11.1 and 18.9 MB. The mid-build figure is now the bundle, the
analyses and the one compile in flight. Opening and analyzing every module took no longer: 2.6
and 2.3 s before, 2.1 and 1.7 s after, in the chain and the fan at N = 30, one run each.

The heap tests' module caches now hold no constant pool, structure or syntax tree, which they
assert; the counting of syntax trees, which they covered, moves to HeapWalkTest and to a third
root of HeapDumpFixture for HprofAnalyzerTest.

Limits: the outline is made as the analysis is, so a throw while making it now fails the module's
analysis rather than one folding or selection request; review found no case that throws. Only one
open module is checked in a dump, HeapReportServerTest's Library. The heap report credits each
object to the first root that reaches it, so a pool that an earlier root also reaches would not
count for a module's caches. The outline's text duplicates the module's source text, which the
analysis keeps too: 64.5 KB for the 64 KB module, among the dump's duplicate strings; the tree held
the same text as a char[], twice the bytes.

Validation: the new selection test fails on errs at f459a2b, with XdkAst and XdkAdapter from
there (NullPointerException in Parameter.getEndPosition, from XdkAst.contains in chainAt), and on
this commit's first version, which left the parameter out (innermost range the class). Over
JSON-RPC, a selectionRange at Element answered ResponseErrorException "Internal error." on errs,
and with this commit four ranges, from Element out to the module. ./gradlew :lang:lsp-server:test
-PlspTests=all -PincludeBuildLang=true -PincludeBuildAttachLang=true --rerun over HeapWalkTest,
HprofAnalyzerTest, HeapReportServerTest, FoldingRangeTest, SelectionRangeTest, XdkFoldingTest,
XdkStructuralTest, XdkRecoveryTest, SemanticTokenTest, XdkSemanticColorTest, XdkSourceLinksTest,
XdkAdapterTest, XdkEditingTest, XdkDeclarationHeaderTest, XdkTypeHeaderTest, XdkInitializerTest,
XdkL65ClosureTest, XdkBlockedModuleTest, XdkPresentationTest, NavigationTest,
XdkSemanticTokenProtocolTest, XdkFeatureResolveProtocolTest, LspIntegrationTest,
XtcLanguageServerTest, CapabilityNegotiationTest, XdkAdapterLifecycleTest,
LibraryContentProtocolTest, XdkLibrarySourcesTest, XdkLibrarySymbolsTest, XdkLibraryDocumentsTest
and XdkRepositoryWorkspaceTest: 55 classes with the nested ones, 283 tests, 2 skipped
(NavigationTest's two @disabled), 0 failures. The whole suite, -PlspTests="!slow & !heavy": 356
classes, 2859 tests, 3 skipped (the two @disabled and the probe), 0 failures. The probe at N = 2,
10 and 30: 1 test, 0 failures. :lang:lsp-server:spotlessCheck passes; :lang:detekt reports nothing.
The editor cases X1, X41, X92, X126, X158, X248, X350 and X354 passed in the container on the first
version of this commit, in VS Code and IntelliJ, X350 and X354 at their documented partial in
IntelliJ.
lagergren added a commit that referenced this pull request Nov 30, 2026
- #824 is fixed by #827, which errs has since its rebase onto master.
- #825's cause is found (the assert in MethodStructure.reorderAnnotations hashed the annotations); #828
  and #834 fix it, both open.
- #831 and #832, found by the Gradle prototype, are fixed by #833, open.
- #835, found by the server's memory work: Parameter.getEndPosition throws for every type parameter
  without extends, which made every selection inside such a class fail on errs; #836 fixes it, open,
  and the outline's TODO: xvm#835 workaround goes once errs has it.

Validation: documentation only.
lagergren added a commit that referenced this pull request Nov 30, 2026
…analysis keeps no compile

An analysis kept each document's compiled syntax tree, which refers to the compile's structures,
and through them to the compile's own copies of ecstasy, the turtle and every module it imports:
about 11 MB for each open module, however small, kept as long as one of its documents is open, or
as a closed module's analysis answers queries. Of the tree, the features read only the text
(semantic tokens, document links), the folding regions and the spans that a selection expands
through; everything else they read comes from the semantic models, which are detached already.

XdkAst.outline copies those out as the analysis is made, into XdkOutline: the text, the blocks'
and the imports' folding regions, and a tree of spans that keeps, for each node, the children that
XdkAst.chainAt stepped into: those of the document's own source, within the node's span. Folding
and selection read the outline as they read the tree, so their answers are the same, but for one
case, which threw before.

Parameter.getEndPosition throws a NullPointerException for a parameter with a name and no type
(xvm#835, fixed by #836), and every type parameter without `extends` is one:
Parser.parseTypeParameterList gives the Element of `class Box<Element>` no type. XdkAst.chainAt
read the span of each child of every node on a selection's path, so on errs a selection anywhere
inside such a class failed, at the type parameter and in the class's body alike: the server logged
"textDocument/selectionRange: request failed" and the client got the JSON-RPC error "Internal
error.". The outline gives such a parameter its name's extent, which is what the javatools fix
gives, under a TODO to use the plain getters once errs has it. A new XdkAdapterTest test selects
at Element in `class Box<Element>`: the innermost range is the name, and each step out is strictly
larger, up to the module.

ServerMemoryProbe, live objects in the dumps, after the previous commit and after this one:

  N   shape  last open           all open, rebuilt    mid-build
  2   chain   64.7 -> 49.2 MB     78.9 -> 52.0 MB     106.5 -> 68.1 MB
  2   fan     64.9 -> 49.4 MB     79.1 -> 52.2 MB     106.6 -> 68.3 MB
  10  chain   65.7 -> 49.8 MB    173.6 -> 52.9 MB     202.0 -> 69.4 MB
  10  fan     65.5 -> 50.0 MB    172.0 -> 53.0 MB     199.7 -> 69.1 MB
  30  chain   68.0 -> 50.9 MB    426.0 -> 55.1 MB     456.7 -> 72.8 MB
  30  fan     66.6 -> 51.1 MB    404.0 -> 54.7 MB     431.7 -> 70.9 MB

An open module of two classes now costs about 40 KB, the 400-class module about 4.1 MB, mostly
its semantic models; before, 11.1 and 18.9 MB. The mid-build figure is now the bundle, the
analyses and the one compile in flight. Opening and analyzing every module took no longer: 2.6
and 2.3 s before, 2.1 and 1.7 s after, in the chain and the fan at N = 30, one run each.

The heap tests' module caches now hold no constant pool, structure or syntax tree, which they
assert; the counting of syntax trees, which they covered, moves to HeapWalkTest and to a third
root of HeapDumpFixture for HprofAnalyzerTest.

Limits: the outline is made as the analysis is, so a throw while making it now fails the module's
analysis rather than one folding or selection request; review found no case that throws. Only one
open module is checked in a dump, HeapReportServerTest's Library. The heap report credits each
object to the first root that reaches it, so a pool that an earlier root also reaches would not
count for a module's caches. The outline's text duplicates the module's source text, which the
analysis keeps too: 64.5 KB for the 64 KB module, among the dump's duplicate strings; the tree held
the same text as a char[], twice the bytes.

Validation: the new selection test fails on errs at f459a2b, with XdkAst and XdkAdapter from
there (NullPointerException in Parameter.getEndPosition, from XdkAst.contains in chainAt), and on
this commit's first version, which left the parameter out (innermost range the class). Over
JSON-RPC, a selectionRange at Element answered ResponseErrorException "Internal error." on errs,
and with this commit four ranges, from Element out to the module. ./gradlew :lang:lsp-server:test
-PlspTests=all -PincludeBuildLang=true -PincludeBuildAttachLang=true --rerun over HeapWalkTest,
HprofAnalyzerTest, HeapReportServerTest, FoldingRangeTest, SelectionRangeTest, XdkFoldingTest,
XdkStructuralTest, XdkRecoveryTest, SemanticTokenTest, XdkSemanticColorTest, XdkSourceLinksTest,
XdkAdapterTest, XdkEditingTest, XdkDeclarationHeaderTest, XdkTypeHeaderTest, XdkInitializerTest,
XdkL65ClosureTest, XdkBlockedModuleTest, XdkPresentationTest, NavigationTest,
XdkSemanticTokenProtocolTest, XdkFeatureResolveProtocolTest, LspIntegrationTest,
XtcLanguageServerTest, CapabilityNegotiationTest, XdkAdapterLifecycleTest,
LibraryContentProtocolTest, XdkLibrarySourcesTest, XdkLibrarySymbolsTest, XdkLibraryDocumentsTest
and XdkRepositoryWorkspaceTest: 55 classes with the nested ones, 283 tests, 2 skipped
(NavigationTest's two @disabled), 0 failures. The whole suite, -PlspTests="!slow & !heavy": 356
classes, 2859 tests, 3 skipped (the two @disabled and the probe), 0 failures. The probe at N = 2,
10 and 30: 1 test, 0 failures. :lang:lsp-server:spotlessCheck passes; :lang:detekt reports nothing.
The editor cases X1, X41, X92, X126, X158, X248, X350 and X354 passed in the container on the first
version of this commit, in VS Code and IntelliJ, X350 and X354 at their documented partial in
IntelliJ.

@cpurdy cpurdy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

@lagergren
lagergren merged commit 17d4ffd into master Nov 30, 2026
5 checks passed
@lagergren
lagergren deleted the lagergren/parameter-end-position branch November 30, 2026 18:02
lagergren added a commit that referenced this pull request Nov 30, 2026
…analysis keeps no compile

An analysis kept each document's compiled syntax tree, which refers to the compile's structures,
and through them to the compile's own copies of ecstasy, the turtle and every module it imports:
about 11 MB for each open module, however small, kept as long as one of its documents is open, or
as a closed module's analysis answers queries. Of the tree, the features read only the text
(semantic tokens, document links), the folding regions and the spans that a selection expands
through; everything else they read comes from the semantic models, which are detached already.

XdkAst.outline copies those out as the analysis is made, into XdkOutline: the text, the blocks'
and the imports' folding regions, and a tree of spans that keeps, for each node, the children that
XdkAst.chainAt stepped into: those of the document's own source, within the node's span. Folding
and selection read the outline as they read the tree, so their answers are the same, but for one
case, which threw before.

Parameter.getEndPosition throws a NullPointerException for a parameter with a name and no type
(xvm#835, fixed by #836), and every type parameter without `extends` is one:
Parser.parseTypeParameterList gives the Element of `class Box<Element>` no type. XdkAst.chainAt
read the span of each child of every node on a selection's path, so on errs a selection anywhere
inside such a class failed, at the type parameter and in the class's body alike: the server logged
"textDocument/selectionRange: request failed" and the client got the JSON-RPC error "Internal
error.". The outline gives such a parameter its name's extent, which is what the javatools fix
gives, under a TODO to use the plain getters once errs has it. A new XdkAdapterTest test selects
at Element in `class Box<Element>`: the innermost range is the name, and each step out is strictly
larger, up to the module.

ServerMemoryProbe, live objects in the dumps, after the previous commit and after this one:

  N   shape  last open           all open, rebuilt    mid-build
  2   chain   64.7 -> 49.2 MB     78.9 -> 52.0 MB     106.5 -> 68.1 MB
  2   fan     64.9 -> 49.4 MB     79.1 -> 52.2 MB     106.6 -> 68.3 MB
  10  chain   65.7 -> 49.8 MB    173.6 -> 52.9 MB     202.0 -> 69.4 MB
  10  fan     65.5 -> 50.0 MB    172.0 -> 53.0 MB     199.7 -> 69.1 MB
  30  chain   68.0 -> 50.9 MB    426.0 -> 55.1 MB     456.7 -> 72.8 MB
  30  fan     66.6 -> 51.1 MB    404.0 -> 54.7 MB     431.7 -> 70.9 MB

An open module of two classes now costs about 40 KB, the 400-class module about 4.1 MB, mostly
its semantic models; before, 11.1 and 18.9 MB. The mid-build figure is now the bundle, the
analyses and the one compile in flight. Opening and analyzing every module took no longer: 2.6
and 2.3 s before, 2.1 and 1.7 s after, in the chain and the fan at N = 30, one run each.

The heap tests' module caches now hold no constant pool, structure or syntax tree, which they
assert; the counting of syntax trees, which they covered, moves to HeapWalkTest and to a third
root of HeapDumpFixture for HprofAnalyzerTest.

Limits: the outline is made as the analysis is, so a throw while making it now fails the module's
analysis rather than one folding or selection request; review found no case that throws. Only one
open module is checked in a dump, HeapReportServerTest's Library. The heap report credits each
object to the first root that reaches it, so a pool that an earlier root also reaches would not
count for a module's caches. The outline's text duplicates the module's source text, which the
analysis keeps too: 64.5 KB for the 64 KB module, among the dump's duplicate strings; the tree held
the same text as a char[], twice the bytes.

Validation: the new selection test fails on errs at f459a2b, with XdkAst and XdkAdapter from
there (NullPointerException in Parameter.getEndPosition, from XdkAst.contains in chainAt), and on
this commit's first version, which left the parameter out (innermost range the class). Over
JSON-RPC, a selectionRange at Element answered ResponseErrorException "Internal error." on errs,
and with this commit four ranges, from Element out to the module. ./gradlew :lang:lsp-server:test
-PlspTests=all -PincludeBuildLang=true -PincludeBuildAttachLang=true --rerun over HeapWalkTest,
HprofAnalyzerTest, HeapReportServerTest, FoldingRangeTest, SelectionRangeTest, XdkFoldingTest,
XdkStructuralTest, XdkRecoveryTest, SemanticTokenTest, XdkSemanticColorTest, XdkSourceLinksTest,
XdkAdapterTest, XdkEditingTest, XdkDeclarationHeaderTest, XdkTypeHeaderTest, XdkInitializerTest,
XdkL65ClosureTest, XdkBlockedModuleTest, XdkPresentationTest, NavigationTest,
XdkSemanticTokenProtocolTest, XdkFeatureResolveProtocolTest, LspIntegrationTest,
XtcLanguageServerTest, CapabilityNegotiationTest, XdkAdapterLifecycleTest,
LibraryContentProtocolTest, XdkLibrarySourcesTest, XdkLibrarySymbolsTest, XdkLibraryDocumentsTest
and XdkRepositoryWorkspaceTest: 55 classes with the nested ones, 283 tests, 2 skipped
(NavigationTest's two @disabled), 0 failures. The whole suite, -PlspTests="!slow & !heavy": 356
classes, 2859 tests, 3 skipped (the two @disabled and the probe), 0 failures. The probe at N = 2,
10 and 30: 1 test, 0 failures. :lang:lsp-server:spotlessCheck passes; :lang:detekt reports nothing.
The editor cases X1, X41, X92, X126, X158, X248, X350 and X354 passed in the container on the first
version of this commit, in VS Code and IntelliJ, X350 and X354 at their documented partial in
IntelliJ.
lagergren added a commit that referenced this pull request Nov 30, 2026
…rrs has #836

The outline gave a parameter with a name and no type its name's extent itself, because
Parameter.getEndPosition threw for it (xvm#835). errs has #836's fix since its rebase onto master, so
the outline reads every node's extent through the plain getters again and the TODO: xvm#835
workaround goes.

Validation:
- XdkAdapterTest's selection at Element in class Box<Element> passes on the plain getters: the
  innermost range is the name, and each step out is strictly larger, up to the module
- :lang:lsp-server:test with -PlspTests=all for XdkAdapterTest, HeapReportServerTest and the
  folding, selection, semantic token and document link classes: 22 classes, 88 tests, 0 failures,
  0 skipped (JUnit XML, old results deleted first)
- :lang:lsp-server:spotlessCheck and :lang:detekt pass
lagergren added a commit that referenced this pull request Dec 1, 2026
…analysis keeps no compile

An analysis kept each document's compiled syntax tree, which refers to the compile's structures,
and through them to the compile's own copies of ecstasy, the turtle and every module it imports:
about 11 MB for each open module, however small, kept as long as one of its documents is open, or
as a closed module's analysis answers queries. Of the tree, the features read only the text
(semantic tokens, document links), the folding regions and the spans that a selection expands
through; everything else they read comes from the semantic models, which are detached already.

XdkAst.outline copies those out as the analysis is made, into XdkOutline: the text, the blocks'
and the imports' folding regions, and a tree of spans that keeps, for each node, the children that
XdkAst.chainAt stepped into: those of the document's own source, within the node's span. Folding
and selection read the outline as they read the tree, so their answers are the same, but for one
case, which threw before.

Parameter.getEndPosition throws a NullPointerException for a parameter with a name and no type
(xvm#835, fixed by #836), and every type parameter without `extends` is one:
Parser.parseTypeParameterList gives the Element of `class Box<Element>` no type. XdkAst.chainAt
read the span of each child of every node on a selection's path, so on errs a selection anywhere
inside such a class failed, at the type parameter and in the class's body alike: the server logged
"textDocument/selectionRange: request failed" and the client got the JSON-RPC error "Internal
error.". The outline gives such a parameter its name's extent, which is what the javatools fix
gives, under a TODO to use the plain getters once errs has it. A new XdkAdapterTest test selects
at Element in `class Box<Element>`: the innermost range is the name, and each step out is strictly
larger, up to the module.

ServerMemoryProbe, live objects in the dumps, after the previous commit and after this one:

  N   shape  last open           all open, rebuilt    mid-build
  2   chain   64.7 -> 49.2 MB     78.9 -> 52.0 MB     106.5 -> 68.1 MB
  2   fan     64.9 -> 49.4 MB     79.1 -> 52.2 MB     106.6 -> 68.3 MB
  10  chain   65.7 -> 49.8 MB    173.6 -> 52.9 MB     202.0 -> 69.4 MB
  10  fan     65.5 -> 50.0 MB    172.0 -> 53.0 MB     199.7 -> 69.1 MB
  30  chain   68.0 -> 50.9 MB    426.0 -> 55.1 MB     456.7 -> 72.8 MB
  30  fan     66.6 -> 51.1 MB    404.0 -> 54.7 MB     431.7 -> 70.9 MB

An open module of two classes now costs about 40 KB, the 400-class module about 4.1 MB, mostly
its semantic models; before, 11.1 and 18.9 MB. The mid-build figure is now the bundle, the
analyses and the one compile in flight. Opening and analyzing every module took no longer: 2.6
and 2.3 s before, 2.1 and 1.7 s after, in the chain and the fan at N = 30, one run each.

The heap tests' module caches now hold no constant pool, structure or syntax tree, which they
assert; the counting of syntax trees, which they covered, moves to HeapWalkTest and to a third
root of HeapDumpFixture for HprofAnalyzerTest.

Limits: the outline is made as the analysis is, so a throw while making it now fails the module's
analysis rather than one folding or selection request; review found no case that throws. Only one
open module is checked in a dump, HeapReportServerTest's Library. The heap report credits each
object to the first root that reaches it, so a pool that an earlier root also reaches would not
count for a module's caches. The outline's text duplicates the module's source text, which the
analysis keeps too: 64.5 KB for the 64 KB module, among the dump's duplicate strings; the tree held
the same text as a char[], twice the bytes.

Validation: the new selection test fails on errs at f459a2b, with XdkAst and XdkAdapter from
there (NullPointerException in Parameter.getEndPosition, from XdkAst.contains in chainAt), and on
this commit's first version, which left the parameter out (innermost range the class). Over
JSON-RPC, a selectionRange at Element answered ResponseErrorException "Internal error." on errs,
and with this commit four ranges, from Element out to the module. ./gradlew :lang:lsp-server:test
-PlspTests=all -PincludeBuildLang=true -PincludeBuildAttachLang=true --rerun over HeapWalkTest,
HprofAnalyzerTest, HeapReportServerTest, FoldingRangeTest, SelectionRangeTest, XdkFoldingTest,
XdkStructuralTest, XdkRecoveryTest, SemanticTokenTest, XdkSemanticColorTest, XdkSourceLinksTest,
XdkAdapterTest, XdkEditingTest, XdkDeclarationHeaderTest, XdkTypeHeaderTest, XdkInitializerTest,
XdkL65ClosureTest, XdkBlockedModuleTest, XdkPresentationTest, NavigationTest,
XdkSemanticTokenProtocolTest, XdkFeatureResolveProtocolTest, LspIntegrationTest,
XtcLanguageServerTest, CapabilityNegotiationTest, XdkAdapterLifecycleTest,
LibraryContentProtocolTest, XdkLibrarySourcesTest, XdkLibrarySymbolsTest, XdkLibraryDocumentsTest
and XdkRepositoryWorkspaceTest: 55 classes with the nested ones, 283 tests, 2 skipped
(NavigationTest's two @disabled), 0 failures. The whole suite, -PlspTests="!slow & !heavy": 356
classes, 2859 tests, 3 skipped (the two @disabled and the probe), 0 failures. The probe at N = 2,
10 and 30: 1 test, 0 failures. :lang:lsp-server:spotlessCheck passes; :lang:detekt reports nothing.
The editor cases X1, X41, X92, X126, X158, X248, X350 and X354 passed in the container on the first
version of this commit, in VS Code and IntelliJ, X350 and X354 at their documented partial in
IntelliJ.
lagergren added a commit that referenced this pull request Dec 1, 2026
…rrs has #836

The outline gave a parameter with a name and no type its name's extent itself, because
Parameter.getEndPosition threw for it (xvm#835). errs has #836's fix since its rebase onto master, so
the outline reads every node's extent through the plain getters again and the TODO: xvm#835
workaround goes.

Validation:
- XdkAdapterTest's selection at Element in class Box<Element> passes on the plain getters: the
  innermost range is the name, and each step out is strictly larger, up to the module
- :lang:lsp-server:test with -PlspTests=all for XdkAdapterTest, HeapReportServerTest and the
  folding, selection, semantic token and document link classes: 22 classes, 88 tests, 0 failures,
  0 skipped (JUnit XML, old results deleted first)
- :lang:lsp-server:spotlessCheck and :lang:detekt pass
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.

Parameter.getEndPosition throws a NullPointerException for a parameter with a name but no type

2 participants