Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ocamlformat
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version=0.27.0
version=0.28.1
profile=janestreet
ocaml-version=4.14.0
2 changes: 1 addition & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ possible and does not make any assumptions about IO.
astring
camlp-streams
(ppx_expect (and (>= v0.17.0) :with-test))
(ocamlformat (and :with-test (= 0.27.0)))
(ocamlformat (and :with-test (= 0.28.1)))
(ocamlc-loc (>= 3.7.0))
(pp (>= 1.1.2))
(csexp (>= 1.5))
Expand Down
2 changes: 1 addition & 1 deletion ocaml-lsp-server.opam
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ depends: [
"astring"
"camlp-streams"
"ppx_expect" {>= "v0.17.0" & with-test}
"ocamlformat" {with-test & = "0.27.0"}
"ocamlformat" {with-test & = "0.28.1"}
"ocamlc-loc" {>= "3.7.0"}
"pp" {>= "1.1.2"}
"csexp" {>= "1.5"}
Expand Down
6 changes: 3 additions & 3 deletions ocaml-lsp-server/src/code_actions/action_inline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ let beta_reduce (paths : Paths.t) (app : Parsetree.expression) =
if is_pure arg then body else with_let ()
| Ppat_var param | Ppat_constraint ({ ppat_desc = Ppat_var param; _ }, _) ->
if is_pure arg then with_subst param else with_let ()
| Ppat_tuple ( pats, _) ->
| Ppat_tuple (pats, _) ->
let pats = List.map ~f:snd pats in
(match arg.pexp_desc with
| Pexp_tuple args ->
let args = List.map ~f:snd args in
List.fold_left2 ~f:beta_reduce_arg ~init:body pats args
let args = List.map ~f:snd args in
List.fold_left2 ~f:beta_reduce_arg ~init:body pats args
| _ -> with_let ())
| _ -> with_let ()
in
Expand Down
6 changes: 2 additions & 4 deletions ocaml-lsp-server/test/e2e-new/diagnostics_filter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ let%expect_test "shorten diagnostics - true" =
unit
((1, 18), (2, 0))
, Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
true
Here is an example of a case that is not matched: true
((8, 12), (9, 0))
|}]
;;
Expand Down Expand Up @@ -94,8 +93,7 @@ let%expect_test "shorten diagnostics - false" =
unit
((1, 18), (6, 5))
, Warning 8: this pattern-matching is not exhaustive.
Here is an example of a case that is not matched:
true
Here is an example of a case that is not matched: true
((8, 12), (10, 16))
|}]
;;
5 changes: 3 additions & 2 deletions ocaml-lsp-server/test/e2e-new/merlin_call_compatible.ml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ let%expect_test "errors: warning is shown" =
{|
{
"resultAsSexp": false,
"result": "{\"class\":\"return\",\"value\":[{\"start\":{\"line\":1,\"col\":9},\"end\":{\"line\":1,\"col\":39},\"type\":\"warning\",\"sub\":[],\"valid\":true,\"message\":\"Warning 8: this pattern-matching is not exhaustive.\\nHere is an example of a case that is not matched:\\nSome _\"}]}"
} |}]
"result": "{\"class\":\"return\",\"value\":[{\"start\":{\"line\":1,\"col\":9},\"end\":{\"line\":1,\"col\":39},\"type\":\"warning\",\"sub\":[],\"valid\":true,\"message\":\"Warning 8: this pattern-matching is not exhaustive.\\n Here is an example of a case that is not matched: Some _\"}]}"
}
|}]
;;

let%expect_test "errors: warning is disabled" =
Expand Down
38 changes: 20 additions & 18 deletions ocaml-lsp-server/test/e2e-new/type_search.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": {
"kind": "markdown",
Expand All @@ -72,8 +72,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": {
"kind": "markdown",
Expand Down Expand Up @@ -112,8 +112,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": null,
"cost": 4,
Expand All @@ -123,14 +123,15 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": null,
"cost": 4,
"constructible": "string_of_int _"
}
] |}]
]
|}]
;;

let%expect_test
Expand Down Expand Up @@ -159,8 +160,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": null,
"cost": 0,
Expand All @@ -170,14 +171,15 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": null,
"cost": 0,
"constructible": "string_of_int _"
}
] |}]
]
|}]
;;

let%expect_test
Expand Down Expand Up @@ -209,8 +211,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": {
"kind": "plaintext",
Expand All @@ -223,8 +225,8 @@ let%expect_test
"name": "string_of_int",
"typ": "int -> string",
"loc": {
"end": { "character": 33, "line": 740 },
"start": { "character": 0, "line": 740 }
"end": { "character": 33, "line": 709 },
"start": { "character": 0, "line": 709 }
},
"doc": {
"kind": "plaintext",
Expand Down
16 changes: 0 additions & 16 deletions ocaml-lsp-server/test/e2e/__tests__/textDocument-codeLens.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@ describe("textDocument/references", () => {

expect(result).toMatchInlineSnapshot(`
[
{
"command": {
"command": "",
"title": "int -> int -> int",
},
"range": {
"end": {
"character": 19,
"line": 4,
},
"start": {
"character": 2,
"line": 4,
},
},
},
{
"command": {
"command": "",
Expand Down
Loading