Skip to content

Commit c70799d

Browse files
authored
Merge pull request #508 from Leonidas-from-XIV/ocamlformat-0.27
Upgrade to ocamlformat 0.27 for OCaml 5.3 compatibility
2 parents 380dcd9 + f3017fc commit c70799d

21 files changed

+97
-85
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
# Upgrade to OCamlformat 0.26.0
22
7f4890bc747650982e5f01eb1e570c9fa127bbdb
3+
# Upgrade to OCamlformat 0.27.0
4+
a4e541b053b6f19f408a795820e9b24e402f7003

.ocamlformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
version=0.26.0
1+
version=0.27.0
22
profile=conventional
33
parse-docstrings=true

bin/cli.mli

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ val pkg_version : [ `Package_version of Dune_release.Version.t option ] Term.t
3333
(** A [--pkg-version] option to specify the packages version. *)
3434

3535
val keep_v : [ `Keep_v of bool Dune_release.Config.Cli.t ] Term.t
36-
(** A [--keep-v] option to not drop the 'v' at the beginning of version strings. *)
36+
(** A [--keep-v] option to not drop the 'v' at the beginning of version strings.
37+
*)
3738

3839
val dist_tag : [ `Dist_tag of Dune_release.Vcs.Tag.t option ] Term.t
3940
(** A [--tag] option to define the tag from which the distribution is or will be
@@ -76,7 +77,8 @@ val yes : [ `Yes of bool ] Term.t
7677
(** A [--yes] option to skip confirmation prompts. *)
7778

7879
val include_submodules : [ `Include_submodules of bool ] Term.t
79-
(** A [--include-submodules] flag to include submodules in the distrib tarball *)
80+
(** A [--include-submodules] flag to include submodules in the distrib tarball
81+
*)
8082

8183
val user : [ `User of string option ] Term.t
8284
(** A [--user] option to define the name of the GitHub account where to push new

bin/distrib.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ val distrib :
2121
unit ->
2222
(int, Bos_setup.R.msg) result
2323
(** [distrib ~build_dir ~dry_run ~name ~pkg_names ~version ~tag ~keep_v
24-
~keep_dir ~skip_lint ~skip_build ~skip_tests ()]
25-
creates a distribution archive for the package built with [name], [version]
26-
and [tag], in [build_dir]. Returns the exit code (0 for success, 1 for
27-
failure) or error messages.
24+
~keep_dir ~skip_lint ~skip_build ~skip_tests ()] creates a distribution
25+
archive for the package built with [name], [version] and [tag], in
26+
[build_dir]. Returns the exit code (0 for success, 1 for failure) or error
27+
messages.
2828
2929
- [keep_v] indicates whether the version is prefixed by 'v'
3030
- If [keep_dir] is [true] the repository checkout used to create the

bin/opam.ml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -320,13 +320,13 @@ let opam_cli () (`Dry_run dry_run) (`Build_dir build_dir)
320320
get_pkgs ?build_dir ?opam ?distrib_file ?pkg_descr ?readme ?change_log
321321
?publish_msg ~dry_run ~keep_v ~tag ~pkg_names ~version ()
322322
>>= (fun pkgs ->
323-
match action with
324-
| `Descr -> descr ~pkgs
325-
| `Pkg -> pkg ~dry_run ?distrib_uri ~pkgs ()
326-
| `Submit ->
327-
submit ?local_repo ?remote_repo ?opam_repo ?user ?token ~dry_run
328-
~pkgs ~pkg_names ~no_auto_open ~yes ~draft ()
329-
| `Field -> field ~pkgs ~field_name)
323+
match action with
324+
| `Descr -> descr ~pkgs
325+
| `Pkg -> pkg ~dry_run ?distrib_uri ~pkgs ()
326+
| `Submit ->
327+
submit ?local_repo ?remote_repo ?opam_repo ?user ?token ~dry_run ~pkgs
328+
~pkg_names ~no_auto_open ~yes ~draft ()
329+
| `Field -> field ~pkgs ~field_name)
330330
|> Cli.handle_error
331331

332332
(* Command line interface *)

bin/opam.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ val get_pkgs :
2222
unit ->
2323
(Dune_release.Pkg.t list, Bos_setup.R.msg) result
2424
(** [get_pkgs ~build_dir ~opam ~distrib_uri ~distrib_file ~readme ~change_log
25-
~publish_msg ~pkg_descr ~dry_run ~keep_v ~tag ~name ~pkg_names ~version ()]
25+
~publish_msg ~pkg_descr ~dry_run ~keep_v ~tag ~name ~pkg_names ~version ()]
2626
returns the list of packages built from the [distrib_file] or the associated
2727
error messages. *)
2828

@@ -55,9 +55,9 @@ val submit :
5555
unit ->
5656
(int, Bos_setup.R.msg) result
5757
(** [submit ?distrib_uri ?local_repo ?remote_repo ?opam_repo ?user ~dry_run
58-
~pkgs ~pkg_names ~no_auto_open ~yes ~draft ()]
59-
opens a pull request on the opam repository for the packages [pkgs]. Returns
60-
the exit code (0 for success, 1 for failure) or error messages. *)
58+
~pkgs ~pkg_names ~no_auto_open ~yes ~draft ()] opens a pull request on the
59+
opam repository for the packages [pkgs]. Returns the exit code (0 for
60+
success, 1 for failure) or error messages. *)
6161

6262
val field :
6363
pkgs:Dune_release.Pkg.t list ->

bin/publish.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ val publish :
2323
unit ->
2424
(int, Bos_setup.R.msg) result
2525
(** [publish ~build_dir ~opam ~change_log ~distrib_uri ~distrib_file
26-
~publish_msg ~version ~tag ~keep_v ~dry_run ~yes ~draft ()]
27-
publishes the artefacts of the package built with [version] and [tag].
28-
Returns the exit code (0 for success, 1 for failure) or error messages.
26+
~publish_msg ~version ~tag ~keep_v ~dry_run ~yes ~draft ()] publishes the
27+
artefacts of the package built with [version] and [tag]. Returns the exit
28+
code (0 for success, 1 for failure) or error messages.
2929
3030
- [keep_v] indicates whether the version is prefixed by 'v'. *)
3131

bin/tag.ml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,20 @@ let tag () (`Dry_run dry_run) (`Change_log change_log) (`Keep_v keep_v)
7676
(`Delete delete) (`Msg msg) (`Yes yes) =
7777
Config.keep_v ~keep_v
7878
>>= (fun keep_v ->
79-
let pkg = Pkg.v ~dry_run ~keep_v ?change_log () in
80-
Vcs.get () >>= fun vcs ->
81-
(match version with
82-
| Some v -> Ok (v, Version.to_tag vcs v)
83-
| None ->
84-
Pkg.change_log pkg >>= fun changelog ->
85-
App_log.status (fun l ->
86-
l "Extracting tag from first entry in %a" Text.Pp.path changelog);
87-
Pkg.extract_version pkg >>= fun cl ->
88-
Ok (Pkg.version_of_changelog pkg cl, Version.Changelog.to_tag vcs cl))
89-
>>= fun (version, tag) ->
90-
vcs_tag vcs pkg tag version ~dry_run ~commit_ish ~force ~sign ~delete
91-
~msg ~yes
92-
>>= fun () -> Ok 0)
79+
let pkg = Pkg.v ~dry_run ~keep_v ?change_log () in
80+
Vcs.get () >>= fun vcs ->
81+
(match version with
82+
| Some v -> Ok (v, Version.to_tag vcs v)
83+
| None ->
84+
Pkg.change_log pkg >>= fun changelog ->
85+
App_log.status (fun l ->
86+
l "Extracting tag from first entry in %a" Text.Pp.path changelog);
87+
Pkg.extract_version pkg >>= fun cl ->
88+
Ok (Pkg.version_of_changelog pkg cl, Version.Changelog.to_tag vcs cl))
89+
>>= fun (version, tag) ->
90+
vcs_tag vcs pkg tag version ~dry_run ~commit_ish ~force ~sign ~delete ~msg
91+
~yes
92+
>>= fun () -> Ok 0)
9393
|> Cli.handle_error
9494

9595
(* Command line interface *)

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ with [Dune](https://github.com/ocaml/dune) and hosted on
4646
odoc
4747
(alcotest :with-test)
4848
(yojson (>= 1.6))
49-
(ocamlformat (and (= 0.26.0) :with-dev-setup))
49+
(ocamlformat (and (= 0.27.0) :with-dev-setup))
5050
)
5151
(conflicts
5252
(result (< 1.5))))

dune-release.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ depends: [
3737
"odoc"
3838
"alcotest" {with-test}
3939
"yojson" {>= "1.6"}
40-
"ocamlformat" {= "0.26.0" & with-dev-setup}
40+
"ocamlformat" {= "0.27.0" & with-dev-setup}
4141
]
4242
conflicts: [
4343
"result" {< "1.5"}

0 commit comments

Comments
 (0)