Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfixes for type resolutions #892

Merged
merged 17 commits into from
Jan 10, 2024
24 changes: 12 additions & 12 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"editor.insertSpaces": false,
"tslint.enable": true,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"ocaml.sandbox": {
"kind": "opam",
"switch": "${workspaceFolder:rescript-vscode}/analysis"
}
}
"editor.insertSpaces": false,
"tslint.enable": true,
"typescript.tsc.autoDetect": "off",
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"ocaml.sandbox": {
"kind": "opam",
"switch": "4.14.0"
}
}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
- Complete for maker-style functions (functions returning type `t` of a module) when encountering a `type t` in relevant scenarios. https://github.com/rescript-lang/rescript-vscode/pull/884
- Expand type aliases in hovers. https://github.com/rescript-lang/rescript-vscode/pull/881

#### :bug: Bug Fix

- Many bugfixes around nested pattern and expression completion. https://github.com/rescript-lang/rescript-vscode/pull/892

#### :nail_care: Polish

- Better error recovery when analysis fails. https://github.com/rescript-lang/rescript-vscode/pull/880
Expand Down
2 changes: 1 addition & 1 deletion analysis/.ocamlformat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
profile = default
version = 0.22.4
version = 0.26.1

field-space = tight-decl
break-cases = toplevel
Expand Down
2 changes: 1 addition & 1 deletion analysis/dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
(ocaml
(>= 4.10))
(ocamlformat
(= 0.22.4))
(= 0.26.1))
(cppo
(= 1.6.9))
(reanalyze
Expand Down
2 changes: 1 addition & 1 deletion analysis/rescript-vscode.opam
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ homepage: "https://github.com/rescript-lang/rescript-vscode"
bug-reports: "https://github.com/rescript-lang/rescript-vscode/issues"
depends: [
"ocaml" {>= "4.10"}
"ocamlformat" {= "0.22.4"}
"ocamlformat" {= "0.26.1"}
"cppo" {= "1.6.9"}
"reanalyze" {= "2.23.0"}
"dune"
Expand Down
9 changes: 5 additions & 4 deletions analysis/src/Cli.ml
Original file line number Diff line number Diff line change
Expand Up @@ -144,10 +144,11 @@ let main () =
~maxLength ~debug
| [_; "codeLens"; path] -> Commands.codeLens ~path ~debug
| [_; "extractDocs"; path] ->

let () = match Sys.getenv_opt "FROM_COMPILER" with
| Some("true") -> Cfg.isDocGenFromCompiler := true
| _ -> () in
let () =
match Sys.getenv_opt "FROM_COMPILER" with
| Some "true" -> Cfg.isDocGenFromCompiler := true
| _ -> ()
in

DocExtraction.extractDocs ~path ~debug
| [_; "codeAction"; path; startLine; startCol; endLine; endCol; currentFile]
Expand Down
4 changes: 3 additions & 1 deletion analysis/src/Commands.ml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ let references ~path ~pos ~debug =
in
print_endline
(if allLocs = [] then Protocol.null
else "[\n" ^ (allLocs |> String.concat ",\n") ^ "\n]")
else "[\n" ^ (allLocs |> String.concat ",\n") ^ "\n]")

let rename ~path ~pos ~newName ~debug =
let result =
Expand Down Expand Up @@ -304,6 +304,8 @@ let test ~path =
(match String.sub rest 0 3 with
| "db+" -> Log.verbose := true
| "db-" -> Log.verbose := false
| "dv+" -> Debug.debugLevel := Verbose
| "dv-" -> Debug.debugLevel := Off
| "def" ->
print_endline
("Definition " ^ path ^ " " ^ string_of_int line ^ ":"
Expand Down
Loading
Loading