Skip to content

Commit

Permalink
Remove workaround for canonicalize function in tests (rescript-lang#992)
Browse files Browse the repository at this point in the history
  • Loading branch information
fhammerschmidt authored and jfrolich committed Sep 3, 2024
1 parent 5e1ff96 commit 055264f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
- Fix highlighting of other languages being affected by rescript-vscode. https://github.com/rescript-lang/rescript-vscode/pull/973
- Use canonicalized URIs/paths for jump to definition. https://github.com/rescript-lang/rescript-vscode/pull/982
- Fix JSX prop special case in end of JSX element. https://github.com/rescript-lang/rescript-vscode/pull/984
- preserve URI format in canonicalizeUri. https://github.com/rescript-lang/rescript-vscode/pull/990
- Remove workaround for canonicalize function in tests https://github.com/rescript-lang/rescript-vscode/pull/992

#### :nail_care: Polish

Expand Down
4 changes: 1 addition & 3 deletions analysis/bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ let main () =
(Json.escape (CreateInterface.command ~path ~cmiFile))
| [_; "format"; path] ->
Printf.printf "\"%s\"" (Json.escape (Commands.format ~path))
| [_; "test"; path] ->
Cfg.isTestMode := true;
Commands.test ~path
| [_; "test"; path] -> Commands.test ~path
| args when List.mem "-h" args || List.mem "--help" args -> prerr_endline help
| _ ->
prerr_endline help;
Expand Down
2 changes: 0 additions & 2 deletions analysis/src/Cfg.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
let debugFollowCtxPath = ref false

let isDocGenFromCompiler = ref false

let isTestMode = ref false
6 changes: 2 additions & 4 deletions analysis/src/Files.ml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,5 @@ let classifySourceFile path =
else Other
let canonicalizeUri uri =
if Cfg.isTestMode.contents then uri |> Uri.toString
else
let path = Uri.toPath uri in
path |> Unix.realpath |> Uri.fromPath |> Uri.toString
let path = Uri.toPath uri in
path |> Unix.realpath |> Uri.fromPath |> Uri.toString

0 comments on commit 055264f

Please sign in to comment.