From 5eda059d53b843d2f0fd4826ecf9e44becc4d656 Mon Sep 17 00:00:00 2001 From: Shai Caspin Date: Tue, 11 Aug 2026 11:01:41 -0700 Subject: [PATCH 1/2] remove second read from hover_data that can deadlock --- sway-lsp/src/capabilities/hover/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway-lsp/src/capabilities/hover/mod.rs b/sway-lsp/src/capabilities/hover/mod.rs index dbcd5a9e786..79e8f637c3f 100644 --- a/sway-lsp/src/capabilities/hover/mod.rs +++ b/sway-lsp/src/capabilities/hover/mod.rs @@ -71,7 +71,7 @@ pub fn hover_data( // The `TypeInfo` of the token does not contain an `Ident`. In this case, // we use the `Ident` of the token itself. None => hover_format( - &state.engines.read(), + &state.engines, token, &ident.name, client_config, From 2a1f164b12d81b2751b248525fb8beaab0ec779a Mon Sep 17 00:00:00 2001 From: Shai Caspin Date: Tue, 11 Aug 2026 11:42:44 -0700 Subject: [PATCH 2/2] Refactor hover_format call to use engines directly --- sway-lsp/src/capabilities/hover/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sway-lsp/src/capabilities/hover/mod.rs b/sway-lsp/src/capabilities/hover/mod.rs index 79e8f637c3f..ac884a63f99 100644 --- a/sway-lsp/src/capabilities/hover/mod.rs +++ b/sway-lsp/src/capabilities/hover/mod.rs @@ -71,7 +71,7 @@ pub fn hover_data( // The `TypeInfo` of the token does not contain an `Ident`. In this case, // we use the `Ident` of the token itself. None => hover_format( - &state.engines, + engines, token, &ident.name, client_config,