Skip to content

Commit eaf6cac

Browse files
Merge pull request #26 from ManuelLerchner/ocaml-5.3.0
Update to Ocaml 5.3.0
2 parents 17b3ba4 + acd4379 commit eaf6cac

File tree

10 files changed

+30
-14
lines changed

10 files changed

+30
-14
lines changed

.github/workflows/odoc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Checkout tree
1616
uses: actions/checkout@v4
1717

18-
- name: Set-up OCaml 5.1.1
18+
- name: Set-up OCaml 5.3.0
1919
uses: ocaml/setup-ocaml@v2
2020
with:
21-
ocaml-compiler: "5.1.1"
21+
ocaml-compiler: "5.3.0"
2222
# disable cache, otherwise generated documentation is missing files
2323
dune-cache: false
2424

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
os:
1818
- ubuntu-latest
1919
ocaml-compiler:
20-
- "5.1.1"
20+
- "5.3.0"
2121

2222
runs-on: ${{ matrix.os }}
2323

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The LP framework was presented at the OCaml Users and Developers Workshop 2023.
66

77
## Install
88

9-
The framework is currently fixed to OCaml 5.1.1. Hence, from an OCaml 5.1.1. switch, LP can be installed using opam:
9+
The framework is currently fixed to OCaml 5.3.0. Hence, from an OCaml 5.3.0. switch, LP can be installed using opam:
1010

1111
```sh
1212
opam pin add less-power https://github.com/just-max/less-power.git#main

dune-project

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"\| and at scale.
1515
)
1616
(depends
17-
(ocaml (= 5.1.1))
17+
(ocaml (= 5.3.0))
1818
(xmlm (and (>= 1.4) (< 1.5)))
1919
(fileutils (and (>= 0.6) (< 0.7)))
2020
(qcheck-core (and (>= 0.21) (< 0.22)))
2121
(ounit2 (and (>= 2.2) (< 2.3)))
2222
(junit (and (>= 2.0) (< 2.1)))
2323
(mtime (and (>= 2.0) (< 2.1)))
2424
(fmt (and (>= 0.9) (< 0.10)))
25-
(ppxlib (and (>= 0.30) (< 0.31)))
26-
(ocaml-compiler-libs (and (>= v0.12) (< v0.13)))
25+
(ppxlib (and (>= 0.36) (< 0.37)))
26+
(ocaml-compiler-libs (and (>= v0.17) (< v0.18)))
2727
(cmdliner (and (>= 1.2) (< 1.3)))
2828
)
2929
)

less-power.opam

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ homepage: "https://github.com/just-max/less-power"
1313
bug-reports: "https://github.com/just-max/less-power/issues"
1414
depends: [
1515
"dune" {>= "3.0"}
16-
"ocaml" {= "5.1.1"}
16+
"ocaml" {= "5.3.0"}
1717
"xmlm" {>= "1.4" & < "1.5"}
1818
"fileutils" {>= "0.6" & < "0.7"}
1919
"qcheck-core" {>= "0.21" & < "0.22"}
2020
"ounit2" {>= "2.2" & < "2.3"}
2121
"junit" {>= "2.0" & < "2.1"}
2222
"mtime" {>= "2.0" & < "2.1"}
2323
"fmt" {>= "0.9" & < "0.10"}
24-
"ppxlib" {>= "0.30" & < "0.31"}
25-
"ocaml-compiler-libs" {>= "v0.12" & < "v0.13"}
24+
"ppxlib" {>= "0.36" & < "0.37"}
25+
"ocaml-compiler-libs" {>= "v0.17" & < "v0.18"}
2626
"cmdliner" {>= "1.2" & < "1.3"}
2727
"odoc" {with-doc}
2828
]

src/ast-check/ast_check.ml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ let pp_violation_message : violation Fmt.t = fun fmt vio ->
7373
(pp_of pp_flow Feature.to_message) vio.feature
7474
Fmt.(option (cut ++ pp_flow)) vio.message
7575

76+
(* Create a duplicate of pp_violation_message that uses a Format_doc.formatter instead of a Format.formatter.
77+
I'm not sure if this is the best way to do this, but it seems to work. *)
78+
let pp_violation_message_doc = fun fmt vio ->
79+
let buffer = Buffer.create 256 in
80+
let formatter = Format.formatter_of_buffer buffer in
81+
pp_violation_message formatter vio;
82+
Format.pp_print_flush formatter ();
83+
Ocaml_common.Format_doc.pp_print_text fmt (Buffer.contents buffer)
84+
7685
let violation location ?message feature = { location ; message; feature }
7786
let violation1 location ?message feature = [violation location ?message feature]
7887

@@ -281,7 +290,7 @@ let pp_violation ppf vio =
281290
loc_ghost = vio.location.Ppxlib.Location.loc_ghost;
282291
}
283292
in
284-
let report = errorf ~loc "%a" pp_violation_message vio in
293+
let report = errorf ~loc "%a" pp_violation_message_doc vio in
285294
print_report ppf report
286295

287296
(* TODO: drop file_violations, path_violations, and pp_violation,

src/stdlib-variants/dune

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
(documentation)
1+
(library
2+
(name stdlib_variants)
3+
(public_name less-power.stdlib-variants)
4+
5+
(libraries common stdlib_components stdlib_alerts std_overrides))

src/stdlib-variants/stdlib-alerts/stdlib_alerts.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ module type Printexc_alerting = sig
105105
line_number : int;
106106
start_char : int;
107107
end_char : int;
108+
end_line : int;
109+
end_col : int;
108110
}
109111

110112
(* only to_string_default can be expected to be pure, not to_string *)

src/stdlib-variants/stdlib-components/signatures/sig_seq.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ module type SafeSeq = sig
88
val uncons : 'a t -> ('a * 'a t) option
99
val length : 'a t -> int
1010
val iter : ('a -> unit) -> 'a t -> unit
11-
val fold_left : ('a -> 'b -> 'a) -> 'a -> 'b t -> 'a
11+
val fold_left : ('acc -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc
1212
val iteri : (int -> 'a -> unit) -> 'a t -> unit
13-
val fold_lefti : ('b -> int -> 'a -> 'b) -> 'b -> 'a t -> 'b
13+
val fold_lefti : ('acc -> int -> 'a -> 'acc) -> 'acc -> 'a t -> 'acc
1414
val for_all : ('a -> bool) -> 'a t -> bool
1515
val exists : ('a -> bool) -> 'a t -> bool
1616
val find : ('a -> bool) -> 'a t -> 'a option

src/stdlib-variants/stdlib-components/stdlib_aliases.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ module SafeAliases = struct
2525
(* module Digest = Digest *)
2626
(* module Domain = Domain *)
2727
(* module Effect = Effect *)
28+
(* module Dynarray = Dynarray *)
2829
module Either = Either
2930
(* module Ephemeron = Ephemeron *)
3031
(* module Filename = Filename *)

0 commit comments

Comments
 (0)