Skip to content

Commit 185754d

Browse files
committed
Merge branch 'master' of github.com:/ocaml/ocaml-lsp into Add-ocamlformat-mlx
* 'master' of github.com:/ocaml/ocaml-lsp: nix: updates (ocaml#1550) refactor: get rid of a bunch of [Stdune.String] uses (ocaml#1551) Deleted a dead link (ocaml#1549) Yojson 3 compat (ocaml#1534) Prepare release 1.23.0 (ocaml#1539) Delegate outline generation to Merlin (ocaml#1529) Fix yojson constraint (ocaml#1538) chore: remove all the stdune [O] references (ocaml#1483) Handle new kind of outline symbol (ocaml#1527)
2 parents 15638a3 + 2c62a1c commit 185754d

File tree

18 files changed

+129
-522
lines changed

18 files changed

+129
-522
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
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 .
@@ -90,7 +90,7 @@ jobs:
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: |

CHANGES.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# unreleased
1+
# 1.23.0
22

33
## Features
44

@@ -14,6 +14,7 @@
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

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,3 @@ date. Also, both servers seem deprecated.
415415
use merlin which means that it supports fewer versions of OCaml and offers less
416416
"smart" functionality - especially in the face of sources that do not yet
417417
compile.
418-
419-
- [ocaml-language-server](https://github.com/ocaml-lsp/ocaml-language-server)
420-
This project is extremely similar in the functionality it provides because it
421-
also reuses merlin on the backend. The essential difference is that this
422-
project is written in typescript, while our server is in OCaml. We feel that
423-
it's best to use OCaml to maximize the contributor pool.

dune-project

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ possible and does not make any assumptions about IO.
7070
(csexp (>= 1.5))
7171
(ocamlformat-rpc-lib (>= 0.21.0))
7272
(odoc :with-doc)
73-
(merlin-lib (and (>= 5.4) (< 6.0)))
73+
(merlin-lib (and (>= 5.5) (< 6.0)))
7474
(ppx_yojson_conv :with-dev-setup)))
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)))

flake.lock

Lines changed: 12 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
flake-utils.url = "github:numtide/flake-utils";
44
nixpkgs.url = "github:nix-ocaml/nix-overlays";
55
merlin5_3 = {
6-
url = "github:liam923/merlin/rename-holes";
6+
url = "github:ocaml/merlin";
77
flake = false;
88
};
99
merlin5_2 = {
@@ -15,7 +15,7 @@
1515
outputs = { self, flake-utils, nixpkgs, ... }@inputs:
1616
let
1717
package = "ocaml-lsp-server";
18-
ocamlformat = pkgs: pkgs.ocamlformat_0_26_2;
18+
ocamlformat = pkgs: pkgs.ocamlformat_0_27_0;
1919
basePackage = {
2020
duneVersion = "3";
2121
version = "n/a";
@@ -59,7 +59,7 @@
5959
jsonrpc = buildDunePackage (basePackage // {
6060
pname = "jsonrpc";
6161
doCheck = false;
62-
propagatedBuildInputs = with pkgs.ocamlPackages; [ ];
62+
propagatedBuildInputs = with pkgs.ocamlPackages; [ yojson ];
6363
});
6464

6565
lsp = buildDunePackage (basePackage // {

jsonrpc.opam

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
synopsis: "Jsonrpc protocol implemenation"
3+
synopsis: "Jsonrpc protocol implementation"
44
description: "See https://www.jsonrpc.org/specification"
55
maintainer: ["Rudi Grinberg <[email protected]>"]
66
authors: [
@@ -20,6 +20,7 @@ homepage: "https://github.com/ocaml/ocaml-lsp"
2020
bug-reports: "https://github.com/ocaml/ocaml-lsp/issues"
2121
depends: [
2222
"dune" {>= "3.0"}
23+
"yojson"
2324
"ocaml" {>= "4.08"}
2425
"odoc" {with-doc}
2526
]

jsonrpc/src/dune

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
(library
22
(public_name jsonrpc)
3+
(libraries yojson)
34
(instrumentation
45
(backend bisect_ppx)))

jsonrpc/src/import.ml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,7 @@ module Option = struct
99
end
1010

1111
module 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

jsonrpc/src/jsonrpc.mli

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
(** Jsonrpc implementation *)
22

33
module 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)

0 commit comments

Comments
 (0)