Skip to content

Commit 83cdcd6

Browse files
authored
Merge pull request #1409 from voodoos/414-support
Prepare for a release compatible with 4.14
2 parents 09eb7b5 + 02ddc06 commit 83cdcd6

40 files changed

+295
-324
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
pull_request:
55
push:
66
branches:
7-
- master
7+
- 414-LTS
88
schedule:
99
# Prime the caches every Monday
1010
- cron: 0 1 * * MON
@@ -21,8 +21,7 @@ jobs:
2121
- macos-latest
2222
- windows-latest
2323
ocaml-compiler:
24-
- "5.2"
25-
24+
- "4.14"
2625

2726
runs-on: ${{ matrix.os }}
2827

@@ -59,19 +58,21 @@ jobs:
5958
- name: Build and install dependencies
6059
run: opam install .
6160

62-
# the makefile explains why we don't use --with-test
63-
# ppx expect is not yet compatible with 5.1 and test output vary from one
64-
# compiler to another. We only test on 4.14.
61+
# the makefile explains why we don't use test dependencies
6562
- name: Install test dependencies
63+
if: matrix.ocaml-compiler == '4.14'
6664
run: opam exec -- make install-test-deps
6765

6866
- name: Run build @all
67+
if: matrix.ocaml-compiler == '4.14'
6968
run: opam exec -- make all
7069

7170
- name: Run the unit tests
71+
if: matrix.ocaml-compiler == '4.14'
7272
run: opam exec -- make test-ocaml
7373

7474
- name: Run the template integration tests
75+
if: matrix.ocaml-compiler == '4.14'
7576
run: opam exec -- make test-e2e
7677

7778
coverage:
@@ -86,7 +87,7 @@ jobs:
8687
- name: Set-up OCaml
8788
uses: ocaml/setup-ocaml@v2
8889
with:
89-
ocaml-compiler: "5.2"
90+
ocaml-compiler: "4.14"
9091
allow-prerelease-opam: true
9192

9293
- name: Set git user

.github/workflows/changelog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Changelog check
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [414-LTS]
66
types: [opened, synchronize, reopened, labeled, unlabeled]
77

88
jobs:

.github/workflows/nix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
push:
55
branches:
6-
- master
6+
- 414-LTS
77
jobs:
88
# tests:
99
# runs-on: ubuntu-latest

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ all:
1717
# results in a conflict
1818
.PHONY: install-test-deps
1919
install-test-deps:
20-
opam install --yes cinaps 'ppx_expect>=v0.17.0' \
20+
opam install --yes cinaps 'ppx_expect<v0.17.0' \
2121
ocamlformat.$$(awk -F = '$$1 == "version" {print $$2}' .ocamlformat)
2222

2323
.PHONY: dev

dune-project

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ possible and does not make any assumptions about IO.
3434
yojson
3535
(ppx_yojson_conv_lib (>= "v0.14"))
3636
(cinaps :with-test)
37-
(ppx_expect (and (>= v0.17.0) :with-test))
37+
(ppx_expect (and (>= v0.15.0) (< 0.17.0) :with-test))
3838
(uutf (>= 1.0.2))
3939
(odoc :with-doc)
4040
(ocaml (>= 4.14))))
@@ -55,21 +55,21 @@ possible and does not make any assumptions about IO.
5555
dyn
5656
stdune
5757
(fiber (and (>= 3.1.1) (< 4.0.0)))
58-
(ocaml (>= 5.2.0))
58+
(ocaml (and (>= 4.14.0) (< 5.0)))
5959
xdg
6060
ordering
6161
dune-build-info
6262
spawn
6363
astring
6464
camlp-streams
65-
(ppx_expect (and (>= v0.17.0) :with-test))
65+
(ppx_expect (and (>= v0.15.0) (< 0.17.0) :with-test))
6666
(ocamlformat (and :with-test (= 0.26.2)))
6767
(ocamlc-loc (>= 3.7.0))
6868
(pp (>= 1.1.2))
6969
(csexp (>= 1.5))
7070
(ocamlformat-rpc-lib (>= 0.21.0))
7171
(odoc :with-doc)
72-
(merlin-lib (and (>= 5.2) (< 6.0)))))
72+
(merlin-lib (and (>= 4.18) (< 5.0)))))
7373

7474
(package
7575
(name jsonrpc)

flake.lock

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

flake.nix

Lines changed: 14 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
{
22
inputs = {
33
flake-utils.url = "github:numtide/flake-utils";
4-
nixpkgs.url = "github:nix-ocaml/nix-overlays";
5-
merlin5_2 = {
6-
url = "github:ocaml/merlin/main";
7-
flake = false;
8-
};
9-
merlin5_1 = {
10-
url = "github:ocaml/merlin/501";
4+
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
5+
merlin4_14 = {
6+
url = "github:ocaml/merlin/v4.18-414";
117
flake = false;
128
};
139
};
@@ -30,7 +26,7 @@
3026
});
3127
dune-release =
3228
prev.dune-release.overrideAttrs (_: { doCheck = false; });
33-
ocamlPackages = prev.ocamlPackages.overrideScope' (oself: osuper:
29+
ocamlPackages = prev.ocamlPackages.overrideScope (oself: osuper:
3430
let
3531
fixPreBuild = o: {
3632
propagatedBuildInputs = o.propagatedBuildInputs ++ [ oself.pp ];
@@ -58,33 +54,24 @@
5854
in rec {
5955
jsonrpc = buildDunePackage (basePackage // {
6056
pname = "jsonrpc";
61-
doCheck = false;
6257
propagatedBuildInputs = with pkgs.ocamlPackages; [ ];
6358
});
6459

6560
lsp = buildDunePackage (basePackage // {
6661
pname = "lsp";
67-
doCheck = false;
6862
propagatedBuildInputs = with pkgs.ocamlPackages; [
6963
jsonrpc
7064
yojson
7165
ppx_yojson_conv_lib
7266
uutf
7367
];
7468
checkInputs = let p = pkgs.ocamlPackages;
75-
in [
76-
p.stdune
77-
p.cinaps
78-
p.ppx_expect
79-
p.ppx_yojson_conv
80-
(ocamlformat pkgs)
81-
];
69+
in [ p.cinaps p.ppx_expect p.ppx_yojson_conv (ocamlformat pkgs) ];
8270
});
8371

8472
ocaml-lsp = with pkgs.ocamlPackages;
8573
buildDunePackage (basePackage // {
8674
pname = package;
87-
doCheck = false;
8875
checkInputs = let p = pkgs.ocamlPackages;
8976
in [
9077
p.ppx_expect
@@ -137,29 +124,20 @@
137124
overlays = [ (ocamlVersionOverlay ocaml) (overlay merlin) ];
138125
inherit system;
139126
};
140-
pkgs_5_1 =
141-
makeNixpkgs (ocaml: ocaml.ocamlPackages_5_1) inputs.merlin5_1;
142-
pkgs_5_2 =
143-
makeNixpkgs (ocaml: ocaml.ocamlPackages_5_2) inputs.merlin5_2;
144-
localPackages_5_1 = makeLocalPackages pkgs_5_1;
145-
localPackages_5_2 = makeLocalPackages pkgs_5_2;
127+
pkgs_4_14 =
128+
makeNixpkgs (ocaml: ocaml.ocamlPackages_4_14) inputs.merlin4_14;
129+
localPackages_4_14 = makeLocalPackages pkgs_4_14;
146130
devShell = localPackages: nixpkgs:
147131
nixpkgs.mkShell {
148132
buildInputs = [ nixpkgs.ocamlPackages.utop ];
149-
inputsFrom =
150-
builtins.map (x: x.overrideAttrs (p: n: { doCheck = true; }))
151-
(builtins.attrValues localPackages);
133+
inputsFrom = builtins.attrValues localPackages;
152134
};
153135
in {
154-
packages = (localPackages_5_2 // {
155-
default = localPackages_5_2.ocaml-lsp;
156-
ocaml_5_1 = localPackages_5_1;
157-
});
136+
packages =
137+
(localPackages_4_14 // { default = localPackages_4_14.ocaml-lsp; });
158138

159139
devShells = {
160-
default = devShell localPackages_5_2 pkgs_5_2;
161-
162-
ocaml5_1 = devShell localPackages_5_1 pkgs_5_1;
140+
default = devShell localPackages_4_14 pkgs_4_14;
163141

164142
release = pkgsWithoutOverlays.mkShell {
165143
buildInputs = [ pkgsWithoutOverlays.dune-release ];
@@ -176,8 +154,8 @@
176154
];
177155
};
178156

179-
check = pkgs_5_2.mkShell {
180-
inputsFrom = builtins.attrValues localPackages_5_2;
157+
check = pkgs_4_14.mkShell {
158+
inputsFrom = builtins.attrValues localPackages_4_14;
181159
};
182160
};
183161
}));

jsonrpc-fiber/test/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
jsonrpc_fiber
1313
;; This is because of the (implicit_transitive_deps false)
1414
;; in dune-project
15-
ppx_expect
15+
ppx_expect.common
1616
ppx_expect.config
1717
ppx_expect.config_types
1818
ppx_inline_test.config

lsp-fiber/test/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
lsp_fiber
2020
;; This is because of the (implicit_transitive_deps false)
2121
;; in dune-project
22-
ppx_expect
22+
ppx_expect.common
2323
ppx_expect.config
2424
ppx_expect.config_types
2525
ppx_inline_test.config

lsp.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ depends: [
2828
"yojson"
2929
"ppx_yojson_conv_lib" {>= "v0.14"}
3030
"cinaps" {with-test}
31-
"ppx_expect" {>= "v0.17.0" & with-test}
31+
"ppx_expect" {>= "v0.15.0" & < "0.17.0" & with-test}
3232
"uutf" {>= "1.0.2"}
3333
"odoc" {with-doc}
3434
"ocaml" {>= "4.14"}

0 commit comments

Comments
 (0)