From 824e31ed5ad9125ed881dedea78a04577325877b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Wed, 30 Jul 2025 14:33:54 +0200 Subject: [PATCH 1/2] Prevent infinite recursion in TypeUtils.resolveTypeForPipeCompletion by not looping over type variables --- analysis/src/TypeUtils.ml | 1 + 1 file changed, 1 insertion(+) diff --git a/analysis/src/TypeUtils.ml b/analysis/src/TypeUtils.ml index 5967edebc..5cb35d0be 100644 --- a/analysis/src/TypeUtils.ml +++ b/analysis/src/TypeUtils.ml @@ -533,6 +533,7 @@ let rec resolveTypeForPipeCompletion ~env ~package ~lhsLoc ~full | _ -> None in match typFromLoc with + | Some ({desc = Tvar _} as t) -> (env, t) | Some typFromLoc -> typFromLoc |> resolveTypeForPipeCompletion ~lhsLoc ~env ~package ~full | None -> From a027389e475418a2fc8f40ce00a5b0100c5366dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9di-R=C3=A9mi=20Hashim?= Date: Wed, 30 Jul 2025 14:36:02 +0200 Subject: [PATCH 2/2] Add CHANGELOG entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0076b2f63..4feeb29e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,8 @@ #### :bug: Bug fix + - Fix: hang in `rescript-editor-analysis.exe codeAction` that sometimes prevented ReScript files from being saved in VS Code. https://github.com/rescript-lang/rescript-vscode/pull/1112 + - Fix: show existing compiler errors and warnings on file open. https://github.com/rescript-lang/rescript-vscode/pull/1103 - Fix: bug where we incorrectly showed a warning notification about something going wrong with incremental type checking, when in fact the compiler was reporting module-related type errors https://github.com/rescript-lang/rescript-vscode/pull/1090