Skip to content

Commit 4fb7315

Browse files
authored
Merge pull request #1536 from voodoos/414-LTS-upgrade
414 lts upgrade
2 parents 9e50f23 + 94e1c31 commit 4fb7315

File tree

107 files changed

+4815
-2454
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

107 files changed

+4815
-2454
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@
77
ab49baa5873e7f0b9181dbed3ad89681f1e4bcee
88
# Upgrade to OCamlformat 0.26.1
99
1a6419bac3ce012deb9c6891e6b25e2486c33388
10+
# Upgrade to OCamlformat 0.27.0
11+
2ccbee5dd691690228307d3636e2f82c8cdb3902

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ updates:
88
- dependencies
99
- no changelog
1010
- package-ecosystem: npm
11-
directory: /ocaml-lsp-server/test/e2e
11+
directory: /
1212
schedule:
1313
interval: daily
1414
labels:

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,14 @@ jobs:
4545
run: yarn --frozen-lockfile
4646
working-directory: ocaml-lsp-server/test/e2e
4747

48-
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
48+
- name: Set-up OCaml
4949
uses: ocaml/setup-ocaml@v3
5050
with:
5151
ocaml-compiler: ${{ matrix.ocaml-compiler }}
52-
allow-prerelease-opam: true
5352

5453
# Remove this pin once a compatible version of Merlin has been released
55-
# - name: Pin dev Merlin
56-
# run: opam pin https://github.com/ocaml/merlin.git#main
54+
- name: Pin dev Merlin
55+
run: opam pin --with-version 4.19-414 https://github.com/voodoos/merlin.git#414-4.19-backports
5756

5857
- name: Build and install dependencies
5958
run: opam install .
@@ -85,10 +84,9 @@ jobs:
8584
submodules: true
8685

8786
- name: Set-up OCaml
88-
uses: ocaml/setup-ocaml@v2
87+
uses: ocaml/setup-ocaml@v3
8988
with:
9089
ocaml-compiler: "4.14"
91-
allow-prerelease-opam: true
9290

9391
- name: Set git user
9492
run: |
@@ -99,7 +97,8 @@ jobs:
9997
run: |
10098
opam install . --deps-only
10199
opam exec -- make coverage-deps install-test-deps
100+
102101
- run: opam exec -- make test-coverage
103102
env:
104-
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
103+
COVERALLS_REPO_TOKEN: ${{ github.token }}
105104
PULL_REQUEST_NUMBER: ${{ github.event.number }}

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ jobs:
1010
name: Check Changelog Action
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: tarides/changelog-check-action@v2
13+
- uses: tarides/changelog-check-action@v3
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Update Nix Flake Lock
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: 0 0 * * 0
7+
8+
jobs:
9+
lockfile:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
- uses: cachix/install-nix-action@v30
15+
with:
16+
nix_path: nixpkgs=channel:nixos-unstable
17+
- uses: DeterminateSystems/update-flake-lock@v24
18+
with:
19+
pr-labels: |
20+
dependencies
21+
no changelog

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=0.26.2
1+
version=0.27.0
22
profile=janestreet
33
ocaml-version=4.14.0

CHANGES.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
# 1.21.0
2+
3+
## Features
4+
5+
- Make `inlay-hint` for function parameters configurable (#1515)
6+
7+
- Add custom `ocamllsp/jumpToTypedHole` to navigate through typed holes (#1516)
8+
9+
- Add a code-action for combining pattern cases (just relaying on regex) (#1514)
10+
11+
- Allow (by configuration) shortening of diagnostics (just highlighting the first line) (#1513)
12+
13+
- Fix `yojson_of_t` for `Nullable_option`: serialize `None` as `Null` instead of asserting false (#1525 fixes #1524)
14+
15+
## Fixes
16+
17+
- Support for `class`, `class type`, `method` and `property` for `DocumentSymbol` query (#1487 fixes #1449)
18+
19+
- Fix `inlay-hint` for function parameters (#1515)
20+
21+
- More precise diagnostics in the event of a failed identifier search (`Definition_query`) (#1518)
22+
23+
- Remove `ocamlformat` application after `destruct` (that remove some useful parenthesis) (#1519)
24+
25+
- Add a new server option `standardHover`, that can be used by clients to
26+
disable the default hover provider. When `standardHover = false`
27+
`textDocument/hover` requests always returns with empty result. (#1416)
28+
129
# 1.20.1
230

331
## Fixes

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Semantic highlighting support is enabled by default.
182182
> since OCaml-LSP 1.14.0
183183
184184
OCaml-LSP implements experimental semantic highlighting support (also known as
185-
semantic tokens support). The support can be activated by passing an evironment
185+
semantic tokens support). The support can be activated by passing an environment
186186
variable to OCaml-LSP:
187187

188188
- To enable non-incremental (expectedly slower but more stable) version, pass
@@ -245,7 +245,7 @@ type t = A | B of string option
245245
let f (v : t) = match v with | A -> _ | B (None) | B (Some _) -> _
246246
```
247247

248-
Importantly, note the undescores in place of expressions in each branch of the
248+
Importantly, note the underscores in place of expressions in each branch of the
249249
pattern match above. The underscores that occur in place of expressions are
250250
called "typed holes" - a concept explained below.
251251

dune-project

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,21 @@ possible and does not make any assumptions about IO.
3131
")
3232
(depends
3333
(jsonrpc (= :version))
34-
yojson
34+
(yojson (< 3.0.0))
3535
(ppx_yojson_conv_lib (>= "v0.14"))
3636
(cinaps :with-test)
3737
(ppx_expect (and (>= v0.15.0) (< 0.17.0) :with-test))
3838
(uutf (>= 1.0.2))
3939
(odoc :with-doc)
40-
(ocaml (>= 4.14))))
40+
(ocaml (>= 4.14))
41+
(ppx_yojson_conv :with-dev-setup)))
4142

4243
(package
4344
(name ocaml-lsp-server)
4445
(synopsis "LSP Server for OCaml")
4546
(description "An LSP server for OCaml.")
4647
(depends
47-
yojson
48+
(yojson (< 3.0.0))
4849
(base (>= v0.16.0))
4950
(lsp (= :version))
5051
(jsonrpc (= :version))
@@ -63,13 +64,14 @@ possible and does not make any assumptions about IO.
6364
astring
6465
camlp-streams
6566
(ppx_expect (and (>= v0.15.0) (< 0.17.0) :with-test))
66-
(ocamlformat (and :with-test (= 0.26.2)))
67+
(ocamlformat (and :with-test (= 0.27.0)))
6768
(ocamlc-loc (>= 3.7.0))
6869
(pp (>= 1.1.2))
6970
(csexp (>= 1.5))
7071
(ocamlformat-rpc-lib (>= 0.21.0))
7172
(odoc :with-doc)
72-
(merlin-lib (and (>= 4.18) (< 5.0)))))
73+
(merlin-lib (and (>= 4.18) (< 5.0)))
74+
(ppx_yojson_conv :with-dev-setup)))
7375

7476
(package
7577
(name jsonrpc)

jsonrpc-fiber/src/jsonrpc_fiber.ml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ struct
137137
;;
138138

139139
let create
140-
?(on_request = on_request_fail)
141-
?(on_notification = on_notification_fail)
142-
~name
143-
chan
144-
state
140+
?(on_request = on_request_fail)
141+
?(on_notification = on_notification_fail)
142+
~name
143+
chan
144+
state
145145
=
146146
let pending = Id.Table.create 10 in
147147
{ chan
@@ -274,8 +274,8 @@ struct
274274
let* () =
275275
Fiber.fork_and_join_unit
276276
(fun () ->
277-
let* () = loop () in
278-
Fiber.Pool.stop later)
277+
let* () = loop () in
278+
Fiber.Pool.stop later)
279279
(fun () -> Fiber.Pool.run later)
280280
in
281281
close t)
@@ -358,11 +358,10 @@ struct
358358
let pending = !batch in
359359
batch := [];
360360
let pending, ivars =
361-
List.fold_left pending ~init:([], []) ~f:(fun (pending, ivars) ->
362-
function
363-
| `Notification n -> Jsonrpc.Packet.Notification n :: pending, ivars
364-
| `Request ((r : Request.t), ivar) ->
365-
Jsonrpc.Packet.Request r :: pending, (r.id, ivar) :: ivars)
361+
List.fold_left pending ~init:([], []) ~f:(fun (pending, ivars) -> function
362+
| `Notification n -> Jsonrpc.Packet.Notification n :: pending, ivars
363+
| `Request ((r : Request.t), ivar) ->
364+
Jsonrpc.Packet.Request r :: pending, (r.id, ivar) :: ivars)
366365
in
367366
List.iter ivars ~f:(fun (id, ivar) -> register_request_ivar t id ivar);
368367
Chan.send t.chan pending)

0 commit comments

Comments
 (0)