File tree Expand file tree Collapse file tree 6 files changed +38
-12
lines changed Expand file tree Collapse file tree 6 files changed +38
-12
lines changed Original file line number Diff line number Diff line change 22
22
- windows-latest
23
23
ocaml-compiler :
24
24
- 4.14.x
25
+ - 5.0.x
26
+ - ocaml-variants.5.1.0+trunk
27
+ exclude :
28
+ - os : windows-latest
29
+ ocaml-compiler : 5.0.x
30
+ - os : windows-latest
31
+ ocaml-compiler : ocaml-variants.5.1.0+trunk
32
+ - os : macos-latest
33
+ ocaml-compiler : 5.0.x
34
+ - os : macos-latest
35
+ ocaml-compiler : ocaml-variants.5.1.0+trunk
25
36
26
37
runs-on : ${{ matrix.os }}
27
38
@@ -60,20 +71,26 @@ jobs:
60
71
opam-repository-mingw: https://github.com/ocaml-opam/opam-repository-mingw.git#sunset
61
72
default: https://github.com/ocaml/opam-repository.git
62
73
63
- - name : Install opam packages
74
+ - name : Build and install opam packages
64
75
run : opam install .
65
76
66
- # the makefile explains why we don't use test dependencies
77
+ # the makefile explains why we don't use --with-test
78
+ # ppx expect is not yet compatible with 5.1 and test output vary from one
79
+ # compiler to another. We only test on 4.14.
67
80
- name : Install test dependencies
81
+ if : matrix.ocaml-compiler == '4.14.x'
68
82
run : opam exec -- make install-test-deps
69
83
70
- - name : Run build
84
+ - name : Run build @all
85
+ if : matrix.ocaml-compiler == '4.14.x'
71
86
run : opam exec -- make all
72
87
73
88
- name : Run the unit tests
89
+ if : matrix.ocaml-compiler == '4.14.x'
74
90
run : opam exec -- make test-ocaml
75
91
76
92
- name : Run the template integration tests
93
+ if : matrix.ocaml-compiler == '4.14.x'
77
94
run : opam exec -- make test-e2e
78
95
79
96
coverage :
Original file line number Diff line number Diff line change
1
+ # Unreleased
2
+
3
+ ## Fixes
4
+
5
+ ## Features
6
+
7
+ - Support building with OCaml 5.0 and 5.1 (#1150 )
8
+
1
9
# 1.16.0
2
10
3
11
## Fixes
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ possible and does not make any assumptions about IO.
65
65
( csexp ( >= 1 .5) )
66
66
( ocamlformat-rpc-lib ( >= 0 .21.0) )
67
67
( odoc :with -doc)
68
- ocaml
68
+ ( ocaml ( and ( >= 4 .14 ) ( < 5 .2 ) ) )
69
69
( merlin-lib ( and ( >= 4 .9) ( < 5 .0) ) ) ) )
70
70
71
71
( package
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ depends: [
41
41
"csexp" {>= "1.5"}
42
42
"ocamlformat-rpc-lib" {>= "0.21.0"}
43
43
"odoc" {with-doc}
44
- "ocaml"
44
+ "ocaml" {>= "4.14" & < "5.2"}
45
45
"merlin-lib" {>= "4.9" & < "5.0"}
46
46
]
47
47
dev-repo: "git+https://github.com/ocaml/ocaml-lsp.git"
Original file line number Diff line number Diff line change @@ -69,10 +69,9 @@ let fold_over_parsetree (parsetree : Mreader.parsetree) =
69
69
let range = Range. of_loc module_expr.pmod_loc in
70
70
push range;
71
71
Ast_iterator. default_iterator.module_expr self module_expr
72
- | Parsetree. Pmod_ident _
73
- | Parsetree. Pmod_apply (_, _)
74
- | Parsetree. Pmod_constraint (_, _)
75
- | Parsetree. Pmod_unpack _ | Parsetree. Pmod_extension _ ->
72
+ | _ ->
73
+ (* We rely on the wildcard pattern to improve compatibility with
74
+ multiple OCaml's parsetree versions *)
76
75
Ast_iterator. default_iterator.module_expr self module_expr
77
76
in
78
77
Original file line number Diff line number Diff line change @@ -422,8 +422,8 @@ end = struct
422
422
self.attributes self pld_attributes
423
423
424
424
let value_binding (self : Ast_iterator.iterator )
425
- ({ pvb_pat; pvb_expr; pvb_attributes; pvb_loc = _ } as vb :
426
- Parsetree.value_binding ) =
425
+ ({ pvb_pat; pvb_expr; pvb_attributes; _ } as vb : Parsetree.value_binding )
426
+ =
427
427
match
428
428
match (pvb_pat.ppat_desc, pvb_expr.pexp_desc) with
429
429
| Parsetree. Ppat_var fn_name , _ -> (
@@ -749,7 +749,9 @@ end = struct
749
749
self.module_type self mt);
750
750
`Custom_iterator
751
751
| Pmod_extension _ -> `Custom_iterator
752
- | Pmod_unpack _ | Pmod_apply (_ , _ ) | Pmod_structure _ ->
752
+ | _ ->
753
+ (* We rely on the wildcard pattern to improve compatibility with
754
+ multiple OCaml's parsetree versions *)
753
755
`Default_iterator
754
756
with
755
757
| `Custom_iterator -> self.attributes self pmod_attributes
You can’t perform that action at this time.
0 commit comments