Skip to content

Commit de2dc6f

Browse files
authored
Merge pull request #1940 from voodoos/414-4.19-backports
414 4.19 backports
2 parents 2b9cd21 + 45cc7b6 commit de2dc6f

Some content is hidden

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

44 files changed

+1943
-485
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# git config blame.ignoreRevsFile .git-blame-ignore-revs
22
beb4b4c5ed38984534effc3cc8733db57820bc7b
3+
013987e10b9ed17a8e06e9e4e859070482254ab2

.github/workflows/main.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,27 @@ name: CI
66
# events but only for the master branch
77
on:
88
push:
9-
branches: [ '414' ]
9+
branches: ["414"]
1010
paths-ignore:
11-
- '**.md'
12-
- '**.txt'
13-
- '.git*'
14-
- 'doc/**'
15-
- 'emacs/**'
16-
- 'vim/**'
17-
- '**/emacs-lint.yml'
11+
- "**.md"
12+
- "**.txt"
13+
- ".git*"
14+
- "doc/**"
15+
- "emacs/**"
16+
- "vim/**"
17+
- "**/emacs-lint.yml"
1818
pull_request:
19-
branches: [ '414' ]
19+
branches: ["414"]
2020
paths-ignore:
21-
- '**.md'
22-
- '**.txt'
23-
- '.git*'
24-
- 'doc/**'
25-
- 'emacs/**'
26-
- 'vim/**'
27-
- '**/emacs-lint.yml'
21+
- "**.md"
22+
- "**.txt"
23+
- ".git*"
24+
- "doc/**"
25+
- "emacs/**"
26+
- "vim/**"
27+
- "**/emacs-lint.yml"
2828
schedule:
29-
- cron: '0 12 */6 * *'
29+
- cron: "0 12 */6 * *"
3030

3131
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
3232
jobs:
@@ -53,7 +53,7 @@ jobs:
5353
- uses: actions/checkout@v3
5454

5555
- name: Set up OCaml ${{ matrix.ocaml-compiler }}
56-
uses: ocaml/setup-ocaml@v2
56+
uses: ocaml/setup-ocaml@v3
5757
with:
5858
# Version of the OCaml compiler to initialise
5959
ocaml-compiler: ${{ matrix.ocaml-compiler }}
@@ -82,9 +82,8 @@ jobs:
8282
opam exec -- dune build
8383
git diff --exit-code
8484
85-
8685
- name: Check that the changes are correctly formatted
8786
if: matrix.os == 'ubuntu-latest'
8887
run: |
89-
opam install ocamlformat.0.26.2
88+
opam install ocamlformat.0.27.0
9089
opam exec -- dune build @fmt

.github/workflows/ocaml-lsp-compat.yml

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ name: Check ocaml-lsp compat
44
# events but only for the master branch
55
on:
66
push:
7-
branches: [ master ]
7+
branches: [master]
88
paths-ignore:
9-
- '**.md'
10-
- '**.txt'
11-
- '.git*'
12-
- 'doc/**'
13-
- 'emacs/**'
14-
- 'vim/**'
15-
- '**/emacs-lint.yml'
9+
- "**.md"
10+
- "**.txt"
11+
- ".git*"
12+
- "doc/**"
13+
- "emacs/**"
14+
- "vim/**"
15+
- "**/emacs-lint.yml"
1616
pull_request:
17-
branches: [ master ]
17+
branches: [master]
1818
paths-ignore:
19-
- '**.md'
20-
- '**.txt'
21-
- '.git*'
22-
- 'doc/**'
23-
- 'emacs/**'
24-
- 'vim/**'
25-
- '**/emacs-lint.yml'
19+
- "**.md"
20+
- "**.txt"
21+
- ".git*"
22+
- "doc/**"
23+
- "emacs/**"
24+
- "vim/**"
25+
- "**/emacs-lint.yml"
2626

2727
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2828
jobs:
@@ -55,4 +55,3 @@ jobs:
5555
opam --cli=2.1 pin --with-version=dev --no-action https://github.com/ocaml/ocaml-lsp.git
5656
opam --cli=2.1 pin --with-version=dev --no-action .
5757
opam install ocaml-lsp-server --with-test --ignore-constraints-on=merlin-lib
58-

.ocamlformat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=0.26.2
1+
version=0.27.0
22
disable=false
33

44
break-cases=fit-or-vertical
@@ -8,4 +8,4 @@ dock-collection-brackets=false
88
# Preserve begin/end
99
exp-grouping=preserve
1010
module-item-spacing=preserve
11-
parse-docstrings=false
11+
parse-docstrings=false

CHANGES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
merlin 4.19
2+
===========
3+
Mon Jun 23 10:10:42 CEST 2024
4+
5+
+ merlin library
6+
- Expose utilities to manipulate typed-holes in `Merlin_analysis.Typed_hole`
7+
(#1888)
8+
- `inlay-hints` fix inlay hints on function parameters (#1923)
9+
- Handle class type in outline (#1932)
10+
- Handle locally defined value in outline (#1936)
11+
+ vim plugin
12+
- Added support for search-by-type (#1846)
13+
This is exposed through the existing `:MerlinSearch` command, that
14+
switches between search-by-type and polarity search depending on the
15+
first character of the query.
16+
117
merlin 4.18
218
===========
319
Tue Nov 26 17:30:42 CET 2024

merlin-lib.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ homepage: "https://github.com/ocaml/merlin"
55
bug-reports: "https://github.com/ocaml/merlin/issues"
66
dev-repo: "git+https://github.com/ocaml/merlin.git"
77
license: "MIT"
8+
x-maintenance-intent: ["(latest)"]
89
build: [
910
["dune" "subst"] {dev}
1011
["dune" "build" "-p" name "-j" jobs]

merlin.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ homepage: "https://github.com/ocaml/merlin"
55
bug-reports: "https://github.com/ocaml/merlin/issues"
66
dev-repo: "git+https://github.com/ocaml/merlin.git"
77
license: "MIT"
8+
x-maintenance-intent: ["(latest)"]
89
build: [
910
["dune" "subst"] {dev}
1011
["dune" "build" "-p" name "-j" jobs]

src/analysis/completion.ml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,10 @@ let complete_methods ~env ~prefix obj =
507507
in
508508
let methods = List.filter ~f:has_prefix (methods_of_type env t) in
509509
List.map methods ~f:(fun (name, ty) ->
510-
let info = `None (* TODO: get documentation. *) in
510+
let info =
511+
`None
512+
(* TODO: get documentation. *)
513+
in
511514
{ name;
512515
kind = `MethodCall;
513516
desc = `Type_scheme ty;

src/analysis/destruct.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ let rec needs_parentheses = function
196196
binding. *)
197197
| Texp_function { cases = [ _ ]; _ }
198198
(* The assumption here is that we're not in a [function ... | ...]
199-
situation but either in [fun param] or [let name param]. *) ->
200-
needs_parentheses ts
199+
situation but either in [fun param] or [let name param]. *)
200+
-> needs_parentheses ts
201201
| _ -> true
202202
end
203203
| _ -> needs_parentheses ts)

src/analysis/inlay_hints.ml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ let pattern_has_constraint (type a) (pattern : a Typedtree.general_pattern) =
1717
pattern.pat_extra
1818

1919
let structure_iterator hint_let_binding hint_pattern_binding
20-
avoid_ghost_location typedtree range callback =
20+
_hint_function_params avoid_ghost_location typedtree range callback =
2121
let case_iterator hint_lhs (iterator : Iterator.iterator) case =
2222
let () = log ~title:"case" "on case" in
2323
let () = if hint_lhs then iterator.pat iterator case.Typedtree.c_lhs in
@@ -136,21 +136,24 @@ let create_hint env typ loc =
136136
let position = loc.Location.loc_end in
137137
(position, label)
138138

139-
let of_structure ~hint_let_binding ~hint_pattern_binding ~avoid_ghost_location
140-
~start ~stop structure =
139+
let of_structure ~hint_let_binding ~hint_pattern_binding ~hint_function_params
140+
~avoid_ghost_location ~start ~stop structure =
141141
let () =
142142
log ~title:"start" "%a" Logger.fmt (fun fmt ->
143143
Format.fprintf fmt
144-
"Start on %s to %s with : let: %b, pat: %b, ghost: %b"
144+
"Start on %s to %s with : let: %b, pat: %b, function_param: %b, \
145+
ghost: %b"
145146
(Lexing.print_position () start)
146147
(Lexing.print_position () stop)
147-
hint_let_binding hint_pattern_binding avoid_ghost_location)
148+
hint_let_binding hint_pattern_binding hint_function_params
149+
avoid_ghost_location)
148150
in
149151
let range = (start, stop) in
150152
let hints = ref [] in
151153
let () =
152154
structure_iterator hint_let_binding hint_pattern_binding
153-
avoid_ghost_location structure range (fun env typ loc ->
155+
hint_function_params avoid_ghost_location structure range
156+
(fun env typ loc ->
154157
let () =
155158
log ~title:"hint" "Find hint %a" Logger.fmt (fun fmt ->
156159
Format.fprintf fmt "%s - %a"

0 commit comments

Comments
 (0)