Skip to content

Clarify how to handle unresolvable codeAction/resolve #1738

@mheiber

Description

@mheiber

What should the server do when the client makes a "codeAction/resolve" request that is unresolvable?

A code action can be unresolvable in at least the following case if I understand correctly:

  • Client sends "textDocument/codeAction"
  • Server responds with a partially-resolved code action (for example, missing both "exit" and "command" fields)
  • The user selects the code action and the client sends "codeAction/resolve"
  • The source code changes (for example, from switching branches)
  • The server is no longer able to resolve the code action because (for example) "extract method" no longer makes sense if the Range sent now corresponds to whitespace.

Is the expected behavior of the server to respond with a ResponseError with code ErrorCodes.InvalidRequest?

Metadata

Metadata

Assignees

No one assigned

    Labels

    *questionIssue represents a question, should be posted to StackOverflow (VS Code)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions