Skip to content

Commit fc89007

Browse files
Remove workaround for canonicalize function in tests (#992)
1 parent ac2f38b commit fc89007

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
- Fix highlighting of other languages being affected by rescript-vscode. https://github.com/rescript-lang/rescript-vscode/pull/973
1818
- Use canonicalized URIs/paths for jump to definition. https://github.com/rescript-lang/rescript-vscode/pull/982
1919
- Fix JSX prop special case in end of JSX element. https://github.com/rescript-lang/rescript-vscode/pull/984
20+
- preserve URI format in canonicalizeUri. https://github.com/rescript-lang/rescript-vscode/pull/990
21+
- Remove workaround for canonicalize function in tests https://github.com/rescript-lang/rescript-vscode/pull/992
2022

2123
#### :nail_care: Polish
2224

analysis/bin/main.ml

+1-3
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ let main () =
191191
(Json.escape (CreateInterface.command ~path ~cmiFile))
192192
| [_; "format"; path] ->
193193
Printf.printf "\"%s\"" (Json.escape (Commands.format ~path))
194-
| [_; "test"; path] ->
195-
Cfg.isTestMode := true;
196-
Commands.test ~path
194+
| [_; "test"; path] -> Commands.test ~path
197195
| args when List.mem "-h" args || List.mem "--help" args -> prerr_endline help
198196
| _ ->
199197
prerr_endline help;

analysis/src/Cfg.ml

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
let debugFollowCtxPath = ref false
22

33
let isDocGenFromCompiler = ref false
4-
5-
let isTestMode = ref false

analysis/src/Files.ml

+2-4
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,5 @@ let classifySourceFile path =
104104
else Other
105105
106106
let canonicalizeUri uri =
107-
if Cfg.isTestMode.contents then uri |> Uri.toString
108-
else
109-
let path = Uri.toPath uri in
110-
path |> Unix.realpath |> Uri.fromPath |> Uri.toString
107+
let path = Uri.toPath uri in
108+
path |> Unix.realpath |> Uri.fromPath |> Uri.toString

0 commit comments

Comments
 (0)