From 615cf8da65ea5222b98074173a46162a4026a309 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Fri, 10 Mar 2023 18:51:21 -0300 Subject: [PATCH 1/2] fix URL scheme for code actions --- CHANGELOG.md | 4 ++++ analysis/src/Xform.ml | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 50c1dd84d..3330e1572 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - Greatly extend completion abilities for unsaved code. WARNING: Might be a bit unstable initially. Report any issues you see. https://github.com/rescript-lang/rescript-vscode/pull/712 +#### :bug: Bug Fix + +- Fix URL scheme for Code Action. https://github.com/rescript-lang/rescript-vscode/pull/748 + ## 1.14.0 #### :rocket: New Feature diff --git a/analysis/src/Xform.ml b/analysis/src/Xform.ml index 915b47273..dff30bbc0 100644 --- a/analysis/src/Xform.ml +++ b/analysis/src/Xform.ml @@ -286,6 +286,7 @@ let extractCodeActions ~path ~pos ~currentFile ~debug = let structure, printExpr, printStructureItem = parse ~filename:currentFile in + let path = path |> Uri.fromPath |> Uri.toString in let codeActions = ref [] in AddTypeAnnotation.xform ~path ~pos ~full ~structure ~codeActions ~debug; IfThenElse.xform ~pos ~codeActions ~printExpr ~path structure; From 2dcc501d51487be08f729f3f4b807a95ac38fcb5 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Thu, 27 Apr 2023 16:28:05 -0300 Subject: [PATCH 2/2] fix conflict --- CHANGELOG.md | 8 ++++---- analysis/src/CodeActions.ml | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dc4cece5..8dc01a08a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ - Docstring template Code Action. https://github.com/rescript-lang/rescript-vscode/pull/764 +#### :bug: Bug Fix + +- Fix URL scheme for Code Action. https://github.com/rescript-lang/rescript-vscode/pull/748 + ## 1.16.0 #### :rocket: New Feature @@ -23,10 +27,6 @@ - Greatly extend completion abilities for unsaved code. WARNING: Might be a bit unstable initially. Report any issues you see. https://github.com/rescript-lang/rescript-vscode/pull/712 - Provide hovers for more unsaved code via the new completion features. https://github.com/rescript-lang/rescript-vscode/pull/749 -#### :bug: Bug Fix - -- Fix URL scheme for Code Action. https://github.com/rescript-lang/rescript-vscode/pull/748 - ## 1.14.0 #### :rocket: New Feature diff --git a/analysis/src/CodeActions.ml b/analysis/src/CodeActions.ml index 844e25bce..0d383685c 100644 --- a/analysis/src/CodeActions.ml +++ b/analysis/src/CodeActions.ml @@ -6,6 +6,7 @@ let stringifyCodeActions codeActions = (codeActions |> List.map Protocol.stringifyCodeAction |> Protocol.array) let make ~title ~kind ~uri ~newText ~range = + let uri = uri |> Uri.fromPath |> Uri.toString in { Protocol.title; codeActionKind = kind;