#2099·serena

find_declaration fails when LSP resolves symbol to a location inside a jar

Author: benkeilCreated Sep 22, 2026Updated Sep 22, 2026

find_declaration / find_symbol type lookups fail with "No symbol declaration found at the location of the regex match" when the underlying language server resolves the definition to a path inside a jar (e.g. a sources jar from the Gradle cache), even though the LSP clearly found the correct location.

Log excerpt:

solidlsp.ls:convert_location_item:1530 - request_definition found symbol at non-existent path: /Users/.../terraform-cdk-library-17.22.0-sources.jar!/de/acme/builder/spoc/SpocServiceDefinitionBuilder.kt ERROR ... ValueError: No symbol declaration found at the location of the regex match. Location: CommonStack.kt:33:6.

Environment:

  • Serena 1.7.0
  • LSP backend, Kotlin language server (JetBrains intellij-server, 263.4702.0)
  • macOS

Steps to reproduce:

  1. Call site in project A calls a function defined in an external dependency (published jar with sources jar attached).
  2. Call find_declaration on the call site.
  3. LSP resolves the definition inside the sources jar.
  4. Tool call fails with ValueError instead of returning the location.