This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 645
src/goLanguageServer.ts: respect configuration changes on server restart #3186
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Change-Id: I0b1e88e7befce2d2fd62f351ec8ab7cecb39cba8
Change-Id: I6d233a9ed13ba6acd1d9e9d0524d960722b9d9a9
ramya-rao-a
reviewed
Apr 26, 2020
Change-Id: I7c1a85756167cc410f37632013d13b2a0695b9fe
Change-Id: Ibe824d151ea5b91268d4da6c1bed60f725cb2fcc
ramya-rao-a
reviewed
Apr 26, 2020
ramya-rao-a
reviewed
Apr 26, 2020
ramya-rao-a
reviewed
Apr 26, 2020
ramya-rao-a
reviewed
Apr 26, 2020
Change-Id: I4f1581ccb556ab8f28d20a6d5782777e33a97f0e
ramya-rao-a
reviewed
Apr 26, 2020
Change-Id: Iddd036a2c1bb16d79a3608856af9b387490e9bfd
ramya-rao-a
approved these changes
Apr 26, 2020
gopherbot
referenced
this pull request
in golang/vscode-go
May 6, 2020
…nges This change replaces the messages that tell the user to reload with automatic calls to the restart function. This way, config changes are automatically reflected - I tested it out locally and it worked pretty nicely. Most of the code to do this was already there, it was just a matter of reordering it correctly and making sure to deregister/re-register the default providers. I also added the mtime check for the language server binary as part of the config. The only other thing that might be still missing is automatic restarts when the language server binary changes on disk, but that might be too much - probably wouldn't be intuitive for the user. After this is merged, it will be really simple to implement #3128. Sorry about the huge PR! It's a lot of code shuffling, and there's one function that I moved back to its original place after #3186 - sorry about that! /cc @hyangah Change-Id: I258dbd3a62d21da30129c08dd840d8e7ea2848e8 GitHub-Last-Rev: 29fd4d6 GitHub-Pull-Request: #24 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/232598 Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As a precursor to https://golang.org/cl/222418, I wanted to extract the logic to start the language server into the restart function. This way, server restarts will account for changes in the configs, flags, etc. Also, I think it simplifies the logic of starting the server because I made it handle the case when there is no server running yet.
Some possible issues are (1) I had to extract a number of global variables to make this work, and (2) I had to add a dependency on deep-equal in order to correctly diff the environment.
Original change here: https://go-review.googlesource.com/c/vscode-go/+/227279.
/cc @hyangah