Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support that server can request a restart from the client. #646

Open
dbaeumer opened this issue Dec 20, 2018 · 5 comments
Open

Support that server can request a restart from the client. #646

dbaeumer opened this issue Dec 20, 2018 · 5 comments
Labels
feature-request Request for new features or functionality new request
Milestone

Comments

@dbaeumer
Copy link
Member

If a server got into an inconsistent state there is little the server can do to recover from this. We should consider to allow server to request:

  • a restart
  • a rsync of documents
  • ...
@mickaelistria
Copy link

What about we don't spec it and mention a server that is in inconsistent state just stops and client is expected to restart it when necessary?

@dbaeumer
Copy link
Member Author

I am just adding this to the new Implementation consideration section. However I still think it would make sense to make this explicit.

@mroch
Copy link

mroch commented Oct 29, 2019

here's a scenario we're running into with Flow: you can pin your project to a specific version of flow by depending on that version of flow-bin in package.json. when the version changes, the LSP server (flow lsp) exits so that the correct version can be restarted. it turns out that it's pretty easy to check out 5 commits within 3 minutes that jump back and forth across one of these version bump commits (say, rebasing a bunch of branches).

alternatively, maybe the server could exit with a particular exit code, like EX_TEMPFAIL (75):

/*
 *	EX_TEMPFAIL -- temporary failure, indicating something that
 *		is not really an error.  In sendmail, this means
 *		that a mailer (e.g.) could not create a connection,
 *		and the request should be reattempted later.
 */
#define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */

https://github.com/freebsd/freebsd/blob/0e869b7d7edf75ff2ef47f2dbebdabadfb216ff2/include/sysexits.h#L84-L87

@LaurentTreguier
Copy link
Contributor

Another possible use case is updating: if a server updates itself, it most likely will have to be restarted to use the new version.

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Oct 31, 2019
@dbaeumer dbaeumer added this to the Backlog milestone Oct 31, 2019
@Linskeyd
Copy link

Are there any updates on the consideration of this proposal? Could a 'restart' request, sent by the server, be considered for 3.16?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality new request
Projects
None yet
Development

No branches or pull requests

5 participants