From: icp1994 <icp1994@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] taplo: Handle LSP shutdown request
Date: Tue, 04 Apr 2023 21:46:51 +0200 [thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43265@inbox.vuxu.org> (raw)
[-- 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
next reply other threads:[~2023-04-04 19:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 19:46 icp1994 [this message]
2023-04-12 23:37 ` [PR PATCH] [Merged]: " classabbyamp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-43265@inbox.vuxu.org \
--to=icp1994@users.noreply.github.com \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).