Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] taplo: Handle LSP shutdown request
@ 2023-04-04 19:46 icp1994
  2023-04-12 23:37 ` [PR PATCH] [Merged]: " classabbyamp
  0 siblings, 1 reply; 2+ messages in thread
From: icp1994 @ 2023-04-04 19:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 636 bytes --]

There is a new pull request by icp1994 against master on the void-packages repository

https://github.com/icp1994/void-packages taplo
https://github.com/void-linux/void-packages/pull/43265

taplo: Handle LSP shutdown request
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture: **x86_64**

The language server hangs till timeout while quitting Helix with a `toml` buffer. This patch was sent upstream by Helix primary author.

\cc @cinerea0 

A patch file from https://github.com/void-linux/void-packages/pull/43265.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-taplo-43265.patch --]
[-- Type: text/x-diff, Size: 2260 bytes --]

From c0e5f371586c4e64be5ade17064beb9a46dbc0fc Mon Sep 17 00:00:00 2001
From: icp <pangolin@vivaldi.net>
Date: Sun, 2 Apr 2023 22:20:07 +0530
Subject: [PATCH] taplo: Handle LSP shutdown request

---
 .../0001-handle-lsp-shutdown-request.patch    | 26 +++++++++++++++++++
 srcpkgs/taplo/template                        |  2 +-
 2 files changed, 27 insertions(+), 1 deletion(-)
 create mode 100644 srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch

diff --git a/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch b/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch
new file mode 100644
index 000000000000..9abf3fd25eaa
--- /dev/null
+++ b/srcpkgs/taplo/patches/0001-handle-lsp-shutdown-request.patch
@@ -0,0 +1,26 @@
+From https://github.com/tamasfe/taplo/pull/354
+From: Michael Davis <mcarsondavis@gmail.com>
+Date: Sun, 20 Nov 2022 12:25:43 -0600
+Subject: [PATCH] Handle LSP shutdown request
+
+These lines in the Server loop discard any messages with the shutdown
+method. The Server can handle and correctly respond to shutdown
+requests, though, so there's no need to discard the message.
+---
+ crates/lsp-async-stub/src/listen.rs | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/crates/lsp-async-stub/src/listen.rs b/crates/lsp-async-stub/src/listen.rs
+index fca0a2980..b6b00f5fd 100644
+--- a/crates/lsp-async-stub/src/listen.rs
++++ b/crates/lsp-async-stub/src/listen.rs
+@@ -64,8 +64,6 @@ impl<W: Clone + 'static> Server<W> {
+                                     drop(output);
+                                     drop(input);
+                                     break;
+-                                } else if msg.method.as_ref().map(|m| m == "shutdown").unwrap_or(false) {
+-                                    continue;
+                                 }
+ 
+                                 let task_fut = self.handle_message(
+
diff --git a/srcpkgs/taplo/template b/srcpkgs/taplo/template
index af4f095d4606..84e86a6c4c3e 100644
--- a/srcpkgs/taplo/template
+++ b/srcpkgs/taplo/template
@@ -1,7 +1,7 @@
 # Template file for 'taplo'
 pkgname=taplo
 version=0.8.0
-revision=1
+revision=2
 build_wrksrc="crates/taplo-cli"
 build_style=cargo
 # no-default-features: allows selecting custom feature set

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: taplo: Handle LSP shutdown request
  2023-04-04 19:46 [PR PATCH] taplo: Handle LSP shutdown request icp1994
@ 2023-04-12 23:37 ` classabbyamp
  0 siblings, 0 replies; 2+ messages in thread
From: classabbyamp @ 2023-04-12 23:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

There's a merged pull request on the void-packages repository

taplo: Handle LSP shutdown request
https://github.com/void-linux/void-packages/pull/43265

Description:
#### Testing the changes
- I tested the changes in this PR: **YES**

#### Local build testing
- I built this PR locally for my native architecture: **x86_64**

The language server hangs till timeout while quitting Helix with a `toml` buffer. This patch was sent upstream by Helix primary author.

\cc @cinerea0 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-04-12 23:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04 19:46 [PR PATCH] taplo: Handle LSP shutdown request icp1994
2023-04-12 23:37 ` [PR PATCH] [Merged]: " classabbyamp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).