microsoft / microsoft/language-server-protocol

Add a way for the server to notify the client that it is shutting down

Open
#252 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request new request
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

Suppose that the server encounters a fatal error, if it simply exits, the client has no information on whether it makes sense to restart the server or not so has to resort to heuristics (e.g. for vscode-languageclient: "The default strategy restart the server unless it crashed 5 times or more in the last 3 minutes."). But in many situations, the server may know whether a restart might help or not, and could communicate this to the client, the closest we have in the protocol currently is:

interface InitializeError {
	/**
	 * Indicates whether the client execute the following retry logic:
	 * (1) show the message provided by the ResponseError to the user
	 * (2) user selects retry or cancel
	 * (3) if user selected retry the initialize method is sent again.
	 */
	retry: boolean;
}

But this can only be used in response to initialize, whereas errors could happen at any point.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the InitializeError interface shown in the issue and review the protocol's existing shutdown and error-handling definitions. Work out the protocol behavior and message shape needed for server shutdown notifications, including how clients should respond. The issue does not name a file or test, so completion criteria will need to be established before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.