File tree Expand file tree Collapse file tree 10 files changed +17
-35
lines changed Expand file tree Collapse file tree 10 files changed +17
-35
lines changed Original file line number Diff line number Diff line change 4949
5050 # Remove this pin once a compatible version of Merlin has been released
5151 - name : Pin dev Merlin
52- run : opam --cli=2.1 pin --with-version=5.4 -503 https://github.com/ocaml/merlin.git#main
52+ run : opam --cli=2.1 pin --with-version=5.5 -503 https://github.com/ocaml/merlin.git#main
5353
5454 - name : Build and install dependencies
5555 run : opam install .
9090
9191 # Remove this pin once a compatible version of Merlin has been released
9292 - name : Pin dev Merlin
93- run : opam --cli=2.1 pin --with-version=5.4 -503 https://github.com/ocaml/merlin.git#main
93+ run : opam --cli=2.1 pin --with-version=5.5 -503 https://github.com/ocaml/merlin.git#main
9494
9595 - name : Install dependencies
9696 run : |
Original file line number Diff line number Diff line change 1414- Fix ` inlay-hint ` for function parameters (#1515 )
1515- More precise diagnostics in the event of a failed identifier search (` Definition_query ` ) (#1518 )
1616- Remove ` ocamlformat ` application after ` destruct ` (that remove some useful parenthesis) (#1519 )
17+ - Make compatible with Yojson 3.x by removing ` Tuple ` and ` Variant ` (#1534 )
1718
1819# 1.22.0
1920
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ possible and does not make any assumptions about IO.
3131" )
3232 ( depends
3333 ( jsonrpc ( = :version ) )
34- ( yojson ( < 3 .0.0 ) )
34+ yojson
3535 ( ppx_yojson_conv_lib ( >= " v0.14" ) )
3636 ( cinaps :with -test)
3737 ( ppx_expect ( and ( >= v0.17.0) :with -test) )
@@ -45,7 +45,7 @@ possible and does not make any assumptions about IO.
4545 (synopsis " LSP Server for OCaml" )
4646 ( description " An LSP server for OCaml." )
4747 ( depends
48- ( yojson ( < 3 .0.0 ) )
48+ yojson
4949 ( base ( >= v0.16.0) )
5050 ( lsp ( = :version ) )
5151 ( jsonrpc ( = :version ) )
@@ -75,8 +75,9 @@ possible and does not make any assumptions about IO.
7575
7676( package
7777 (name jsonrpc)
78- (synopsis " Jsonrpc protocol implemenation " )
78+ (synopsis " Jsonrpc protocol implementation " )
7979 ( description " See https://www.jsonrpc.org/specification" )
8080 ( depends
81+ yojson
8182 ( ocaml ( >= 4 .08) )
8283 ( odoc :with -doc) ) )
Original file line number Diff line number Diff line change 11# This file is generated by dune, edit dune-project instead
22opam-version: "2.0"
3- synopsis: "Jsonrpc protocol implemenation "
3+ synopsis: "Jsonrpc protocol implementation "
44description: "See https://www.jsonrpc.org/specification"
55maintainer: ["Rudi Grinberg <
[email protected] >"]
66authors: [
@@ -20,6 +20,7 @@ homepage: "https://github.com/ocaml/ocaml-lsp"
2020bug-reports: "https://github.com/ocaml/ocaml-lsp/issues"
2121depends: [
2222 "dune" {>= "3.0"}
23+ "yojson"
2324 "ocaml" {>= "4.08"}
2425 "odoc" {with-doc}
2526]
Original file line number Diff line number Diff line change 11(library
22 (public_name jsonrpc)
3+ (libraries yojson)
34 (instrumentation
45 (backend bisect_ppx)))
Original file line number Diff line number Diff line change @@ -9,18 +9,7 @@ module Option = struct
99end
1010
1111module Json = struct
12- type t =
13- [ `Assoc of (string * t ) list
14- | `Bool of bool
15- | `Float of float
16- | `Int of int
17- | `Intlit of string
18- | `List of t list
19- | `Null
20- | `String of string
21- | `Tuple of t list
22- | `Variant of string * t option
23- ]
12+ type t = Yojson.Safe .t
2413
2514 exception Of_json of (string * t)
2615
Original file line number Diff line number Diff line change 11(* * Jsonrpc implementation *)
22
33module Json : sig
4- type t =
5- [ `Assoc of (string * t ) list
6- | `Bool of bool
7- | `Float of float
8- | `Int of int
9- | `Intlit of string
10- | `List of t list
11- | `Null
12- | `String of string
13- | `Tuple of t list
14- | `Variant of string * t option
15- ]
4+ type t = Yojson.Safe .t
165
176 (* * Raised when conversions from json fail *)
187 exception Of_json of (string * t)
Original file line number Diff line number Diff line change @@ -64,11 +64,11 @@ module Json = struct
6464 | `Bool f -> Bool f
6565 | `Assoc o -> Record (List. map o ~f: (fun (k , v ) -> k, to_dyn v))
6666 | `List l -> List (List. map l ~f: to_dyn)
67- | `Tuple args -> Tuple (List. map args ~f: to_dyn)
6867 | `Null -> Dyn. Variant (" Null" , [] )
69- | `Variant (name , Some arg ) -> Variant (name, [ to_dyn arg ])
70- | `Variant (name , None) -> Variant (name, [] )
7168 | `Intlit s -> String s
69+ | _ -> Dyn. Variant (" Unsupported" , [] )
70+ (* This last case is unused with Yojson >= 3 *)
71+ [@@ warning " -11" ]
7272 ;;
7373end
7474
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ bug-reports: "https://github.com/ocaml/ocaml-lsp/issues"
2525depends: [
2626 "dune" {>= "3.0"}
2727 "jsonrpc" {= version}
28- "yojson" {< "3.0.0"}
28+ "yojson"
2929 "ppx_yojson_conv_lib" {>= "v0.14"}
3030 "cinaps" {with-test}
3131 "ppx_expect" {>= "v0.17.0" & with-test}
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ homepage: "https://github.com/ocaml/ocaml-lsp"
2020bug-reports: "https://github.com/ocaml/ocaml-lsp/issues"
2121depends: [
2222 "dune" {>= "3.0"}
23- "yojson" {< "3.0.0"}
23+ "yojson"
2424 "base" {>= "v0.16.0"}
2525 "lsp" {= version}
2626 "jsonrpc" {= version}
You can’t perform that action at this time.
0 commit comments