denoland/deno · error

Unable to convert implementation info: {:#}

Error message

Unable to convert implementation info: {:#}

What it means

Results of textDocument/implementation (find implementations of an interface or class member) are converted through DocumentSpan::collect_into_goto_definition_response; this wraps a conversion failure. Like the definition providers, the failure usually happens while converting spans in the TARGET documents where the implementations live, rather than in the file the request was made from.

Source

Thrown at cli/lsp/ts_server.rs:763

                  module.scope.as_ref().map(|s| s.as_str()).unwrap_or("null"),
                );
              }
            })
            .unwrap_or_default();
          if let Some(implementations) = implementations {
            implementations_with_modules
              .extend(implementations.into_iter().map(|i| (i, module.clone())))
          }
        }
        super::tsc::DocumentSpan::collect_into_goto_definition_response(
          implementations_with_modules
            .iter()
            .map(|(i, m)| (&i.document_span, m.as_ref())),
          snapshot,
          token,
        )
        .map_err(|err| {
          anyhow!("Unable to convert implementation info: {:#}", err)
        })
      }
    }
  }

  pub async fn provide_folding_range(
    &self,
    module: &DocumentModule,
    snapshot: Arc<StateSnapshot>,
    token: &CancellationToken,
  ) -> Result<Option<Vec<lsp::FoldingRange>>, AnyError> {
    match self {
      Self::Js(ts_server) => {
        let outlining_spans = ts_server
          .get_outlining_spans(snapshot.clone(), module, token)
          .await?;
        if !outlining_spans.is_empty() {
          let folding_ranges = outlining_spans

View on GitHub (pinned to 9ad36f7a2c)

Solutions

  1. Save the files involved and retry the implementations request.
  2. Run "Deno: Restart Language Server" if it persists.
  3. Update Deno; inspect the wrapped error after the colon in the language server output.
Defensive patterns

Strategy: retry

Try / catch

// Implementations conversion: retry once after saving targets.
async function implementationsSafe(client, params) {
  try {
    return await client.sendRequest('textDocument/implementation', params);
  } catch (err) {
    if (String(err?.message).includes('Unable to convert implementation info')) {
      await sleep(250);
      return await client.sendRequest('textDocument/implementation', params);
    }
    throw err;
  }
}

Prevention

When it happens

Trigger: An implementations request where one implementation location fails to convert — a target file changed or closed after locations were computed, or a span that no longer maps to its document's content.

Common situations: Invoking Find Implementations right after editing implementing classes; implementations spread across many recently-modified files.

Related errors


AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20). Data as JSON: /api/errors/b410a370675d3eb2. Report an issue: GitHub.