2026-03-02 11:01.22: New job: test ocaml-ppx/ppxlib https://github.com/ocaml-ppx/ppxlib.git#refs/pull/629/head (51fb44d0bd133b6658a939ee098b9a09c78df740) (linux-x86_64:(lint-fmt)) Base: ocaml/opam:debian-13-ocaml-4.08@sha256:016974eca0405838af73274ed51d1a69a31f37211486cd4f5dfedd706192cce7 ocamlformat version: version 0.28.1 (from opam) To reproduce locally: git clone --recursive "https://github.com/ocaml-ppx/ppxlib.git" && cd "ppxlib" && git fetch origin "refs/pull/629/head" && git reset --hard 51fb44d0 cat > Dockerfile <<'END-OF-DOCKERFILE' FROM ocaml/opam:debian-13-ocaml-4.08@sha256:016974eca0405838af73274ed51d1a69a31f37211486cd4f5dfedd706192cce7 USER 1000:1000 RUN cd ~/opam-repository && (git cat-file -e 302e116c4009da2f5a31c350a57c8b3c9b27289e || git fetch origin master) && git reset -q --hard 302e116c4009da2f5a31c350a57c8b3c9b27289e && git log --no-decorate -n1 --oneline && opam update -u RUN opam depext -i dune WORKDIR /src RUN opam depext -i ocamlformat=0.28.1 COPY --chown=1000:1000 . /src/ RUN opam exec -- dune build @fmt --ignore-promoted-rules || (echo "dune build @fmt failed"; exit 2) END-OF-DOCKERFILE docker build . END-REPRO-BLOCK 2026-03-02 11:01.22: Using cache hint "ocaml-ppx/ppxlib-ocaml/opam:debian-13-ocaml-4.08@sha256:016974eca0405838af73274ed51d1a69a31f37211486cd4f5dfedd706192cce7-debian-13-4.08_opam-2.5-ocamlformat-302e116c4009da2f5a31c350a57c8b3c9b27289e" 2026-03-02 11:01.22: Using OBuilder spec: ((from ocaml/opam:debian-13-ocaml-4.08@sha256:016974eca0405838af73274ed51d1a69a31f37211486cd4f5dfedd706192cce7) (user (uid 1000) (gid 1000)) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "cd ~/opam-repository && (git cat-file -e 302e116c4009da2f5a31c350a57c8b3c9b27289e || git fetch origin master) && git reset -q --hard 302e116c4009da2f5a31c350a57c8b3c9b27289e && git log --no-decorate -n1 --oneline && opam update -u")) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam depext -i dune")) (workdir /src) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam depext -i ocamlformat=0.28.1")) (copy (src .) (dst /src/)) (run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)")) ) 2026-03-02 11:01.22: Waiting for resource in pool OCluster 2026-03-02 11:01.22: Waiting for worker… 2026-03-02 11:01.44: Got resource from pool OCluster Building on odawa.caelum.ci.dev All commits already cached HEAD is now at 51fb44d0 Add support for 5.4 bivariant type parameters in type declaration (from ocaml/opam:debian-13-ocaml-4.08@sha256:016974eca0405838af73274ed51d1a69a31f37211486cd4f5dfedd706192cce7) 2026-03-02 11:02.15 ---> saved as "8e880d54b82285cc07797680056d2282ee7dd8d645150afdce9c0dfbe68786cc" /: (user (uid 1000) (gid 1000)) /: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "cd ~/opam-repository && (git cat-file -e 302e116c4009da2f5a31c350a57c8b3c9b27289e || git fetch origin master) && git reset -q --hard 302e116c4009da2f5a31c350a57c8b3c9b27289e && git log --no-decorate -n1 --oneline && opam update -u")) From https://github.com/ocaml/opam-repository * branch master -> FETCH_HEAD 340ee6fd1f..f7006d12f1 master -> origin/master 302e116c40 Merge pull request #29374 from shonfeder/release-dune-3.21.1 <><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><> [default] Initialised default (at git+file:///home/opam/opam-repository): [INFO] opam 2.1 and 2.2 include many performance and security improvements over 2.0; please consider upgrading (https://opam.ocaml.org/doc/Install.html) Everything as up-to-date as possible (run with --verbose to show unavailable upgrades). However, you may "opam upgrade" these packages explicitly, which will ask permission to downgrade or uninstall the conflicting packages. Nothing to do. # Run eval $(opam env) to update the current shell environment 2026-03-02 11:03.07 ---> saved as "b08ff0ee2b029d47ebd63fda058aa6322a9ef2a1ca63d0b41e317156fad9ff84" /: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam depext -i dune")) # Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian # No extra OS packages requirements found. # All required OS packages found. # Now letting opam install the packages The following actions will be performed: - install dune 3.21.1 <><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><> [dune.3.21.1] found in cache <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed dune.3.21.1 Done. # Run eval $(opam env) to update the current shell environment 2026-03-02 11:03.35 ---> saved as "ecc6dc342ae71659e951fc3d7f3b0f8bae5f117e98a01e439731b1eb512382b0" /: (workdir /src) /src: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam depext -i ocamlformat=0.28.1")) # Detecting depexts using vars: arch=x86_64, os=linux, os-distribution=debian, os-family=debian # No extra OS packages requirements found. # All required OS packages found. # Now letting opam install the packages The following actions will be performed: - install sexplib0 v0.14.0 [required by base] - install ocamlbuild 0.16.1 [required by fpath, astring, uuseg] - install either 1.0.0 [required by ocamlformat-lib] - install menhirLib 20260209 [required by ocamlformat-lib] - install dune-build-info 3.21.1 [required by ocamlformat-lib] - install csexp 1.5.2 [required by ocamlformat] - install menhirSdk 20260209 [required by ocamlformat-lib] - install menhirGLR 20260209 [required by menhir] - install camlp-streams 5.0.1 [required by ocamlformat-lib] - install seq base [required by re] - install fix 20250919 [required by ocamlformat-lib] - install ocamlfind 1.9.8 [required by ocp-indent, astring, fpath, uuseg] - install ocaml-version 4.0.3 [required by ocamlformat-lib] - install cmdliner 2.1.0 [required by ocamlformat] - install menhirCST 20260209 [required by menhir] - install dune-configurator 3.21.1 [required by base] - install re 1.11.0 [required by ocamlformat] - install topkg 1.1.1 [required by fpath, astring, uuseg] - install ocp-indent 1.9.0 [required by ocamlformat-lib] - install menhir 20260209 [required by ocamlformat-lib] - install base v0.14.3 [required by ocamlformat-lib] - install uutf 1.0.4 [required by ocamlformat-lib] - install astring 0.8.5 [required by ocamlformat-lib] - install stdio v0.14.0 [required by ocamlformat-lib] - install uucp 15.0.0 [required by uuseg] - install fpath 0.7.3 [required by ocamlformat-lib] - install uuseg 15.0.0 [required by ocamlformat-lib] - install ocamlformat-lib 0.28.1 [required by ocamlformat] - install ocamlformat 0.28.1 ===== 29 to install ===== <><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><> [astring.0.8.5] found in cache [base.v0.14.3] found in cache [camlp-streams.5.0.1] found in cache [cmdliner.2.1.0] found in cache [csexp.1.5.2] found in cache [dune-build-info.3.21.1] found in cache [dune-configurator.3.21.1] found in cache [either.1.0.0] found in cache [fix.20250919] found in cache [fpath.0.7.3] found in cache [menhir.20260209] found in cache [menhirCST.20260209] found in cache [menhirGLR.20260209] found in cache [menhirLib.20260209] found in cache [menhirSdk.20260209] found in cache [ocaml-version.4.0.3] found in cache [ocamlbuild.0.16.1] found in cache [ocamlfind.1.9.8] found in cache [ocamlformat.0.28.1] found in cache [ocamlformat-lib.0.28.1] found in cache [ocp-indent.1.9.0] found in cache [re.1.11.0] found in cache [sexplib0.v0.14.0] found in cache [stdio.v0.14.0] found in cache [topkg.1.1.1] found in cache [uucp.15.0.0] found in cache [uuseg.15.0.0] found in cache [uutf.1.0.4] found in cache <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> installed seq.base -> installed camlp-streams.5.0.1 -> installed csexp.1.5.2 -> installed either.1.0.0 -> installed fix.20250919 -> installed cmdliner.2.1.0 -> installed menhirCST.20260209 -> installed menhirGLR.20260209 -> installed menhirLib.20260209 -> installed menhirSdk.20260209 -> installed ocaml-version.4.0.3 -> installed re.1.11.0 -> installed sexplib0.v0.14.0 -> installed dune-build-info.3.21.1 -> installed dune-configurator.3.21.1 -> installed ocamlfind.1.9.8 -> installed ocamlbuild.0.16.1 -> installed ocp-indent.1.9.0 -> installed menhir.20260209 -> installed base.v0.14.3 -> installed topkg.1.1.1 -> installed stdio.v0.14.0 -> installed uutf.1.0.4 -> installed astring.0.8.5 -> installed fpath.0.7.3 -> installed uucp.15.0.0 -> installed uuseg.15.0.0 -> installed ocamlformat-lib.0.28.1 -> installed ocamlformat.0.28.1 Done. <><> ocp-indent.1.9.0 installed successfully ><><><><><><><><><><><><><><><><><> => This package requires additional configuration for use in editors. Install package 'user-setup', or manually: * for Emacs, add these lines to ~/.emacs: (add-to-list 'load-path "/home/opam/.opam/4.08/share/emacs/site-lisp") (require 'ocp-indent) * for Vim, add this line to ~/.vimrc: set rtp^="/home/opam/.opam/4.08/share/ocp-indent/vim" # Run eval $(opam env) to update the current shell environment 2026-03-02 11:04.24 ---> saved as "5bd5c38c9bd7c6e28df7f0a29ad6b8aecee5d6d63694a0a64c17b9eabec41dcd" /src: (copy (src .) (dst /src/)) 2026-03-02 11:04.24 ---> saved as "b313fe87d59e279cb5e06d0b83a37c848f1193e85db6c3e5ad6e8ef669e285a3" /src: (run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)")) File "astlib/encoding_504.mli", line 1, characters 0-0: diff --git a/_build/default/astlib/encoding_504.mli b/_build/default/astlib/.formatted/encoding_504.mli index f38c38f..8264e4d 100644 --- a/_build/default/astlib/encoding_504.mli +++ b/_build/default/astlib/.formatted/encoding_504.mli @@ -31,18 +31,15 @@ module To_503 : sig loc:Location.t -> payload -> (string option * pattern) list * closed_flag val encode_bivariant_param : - core_type -> injectivity -> - core_type * (variance * injectivity) + core_type -> injectivity -> core_type * (variance * injectivity) val decode_bivariant_param : - (core_type * (variance * injectivity)) -> - (core_type * injectivity) option + core_type * (variance * injectivity) -> (core_type * injectivity) option val encode_bivariant_pstr_type : loc:Location.t -> rec_flag -> type_declaration list -> structure_item_desc - val decode_bivariant_pstr : - loc:Location.t -> payload -> structure_item_desc + val decode_bivariant_pstr : loc:Location.t -> payload -> structure_item_desc end module To_502 : sig File "astlib/stdlib0.ml", line 1, characters 0-0: diff --git a/_build/default/astlib/stdlib0.ml b/_build/default/astlib/.formatted/stdlib0.ml index 8a88d3c..f6ebc78 100644 --- a/_build/default/astlib/stdlib0.ml +++ b/_build/default/astlib/.formatted/stdlib0.ml @@ -37,8 +37,8 @@ module List = struct let without_first l ~pred = let rec aux seen = function | [] -> None - | hd::tl when pred hd -> Some (List.rev_append seen tl) - | hd::tl -> aux (hd::seen) tl + | hd :: tl when pred hd -> Some (List.rev_append seen tl) + | hd :: tl -> aux (hd :: seen) tl in aux [] l end File "astlib/encoding_504.ml", line 1, characters 0-0: diff --git a/_build/default/astlib/encoding_504.ml b/_build/default/astlib/.formatted/encoding_504.ml index 81b5d60..13f6061 100644 --- a/_build/default/astlib/encoding_504.ml +++ b/_build/default/astlib/.formatted/encoding_504.ml @@ -363,48 +363,43 @@ end module To_503 = struct include Make (Ast_503_arg) - open Ast_503.Asttypes open Ast_503.Parsetree let encode_bivariant_param typ inj = - let loc = {typ.ptyp_loc with Location.loc_ghost = true} in + let loc = { typ.ptyp_loc with Location.loc_ghost = true } in let attr = - { attr_name = {txt = Ext_name.bivariant_param; loc} - ; attr_payload = PStr [] - ; attr_loc = loc + { + attr_name = { txt = Ext_name.bivariant_param; loc }; + attr_payload = PStr []; + attr_loc = loc; } in - ({typ with ptyp_attributes = attr::typ.ptyp_attributes}, (NoVariance, inj)) + ( { typ with ptyp_attributes = attr :: typ.ptyp_attributes }, + (NoVariance, inj) ) let decode_bivariant_param (typ, (var, inj)) = let ptyp_attributes = - List.without_first typ.ptyp_attributes - ~pred: - (fun attr -> String.equal attr.attr_name.txt Ext_name.bivariant_param) + List.without_first typ.ptyp_attributes ~pred:(fun attr -> + String.equal attr.attr_name.txt Ext_name.bivariant_param) in - match ptyp_attributes, var with - | Some ptyp_attributes, NoVariance -> Some ({typ with ptyp_attributes}, inj) + match (ptyp_attributes, var) with + | Some ptyp_attributes, NoVariance -> + Some ({ typ with ptyp_attributes }, inj) | None, _ -> None - | Some _, _ -> - invalid_encoding ~loc:typ.ptyp_loc "bivariant type parameter" + | Some _, _ -> invalid_encoding ~loc:typ.ptyp_loc "bivariant type parameter" let encode_bivariant_pstr_type ~loc rec_flag tds = - let loc = {loc with Location.loc_ghost = true} in + let loc = { loc with Location.loc_ghost = true } in let ext = - ( {txt = Ext_name.bivariant_pstr; loc} - , PStr - [ { pstr_loc = loc - ; pstr_desc = Pstr_type (rec_flag, tds) - } - ] - ) + ( { txt = Ext_name.bivariant_pstr; loc }, + PStr [ { pstr_loc = loc; pstr_desc = Pstr_type (rec_flag, tds) } ] ) in Pstr_extension (ext, []) let decode_bivariant_pstr ~loc payload = match payload with - | PStr [{pstr_desc = (Pstr_type _) as x; _}] -> x + | PStr [ { pstr_desc = Pstr_type _ as x; _ } ] -> x | _ -> invalid_encoding ~loc "bivariant structure_item" end File "astlib/migrate_503_504.ml", line 1, characters 0-0: diff --git a/_build/default/astlib/migrate_503_504.ml b/_build/default/astlib/.formatted/migrate_503_504.ml index 7e26db4..2e18b75 100644 --- a/_build/default/astlib/migrate_503_504.ml +++ b/_build/default/astlib/.formatted/migrate_503_504.ml @@ -544,7 +544,7 @@ and copy_structure : Ast_503.Parsetree.structure -> Ast_504.Parsetree.structure and copy_structure_item : Ast_503.Parsetree.structure_item -> Ast_504.Parsetree.structure_item = fun { Ast_503.Parsetree.pstr_desc; Ast_503.Parsetree.pstr_loc } -> - let loc = copy_location pstr_loc in + let loc = copy_location pstr_loc in { Ast_504.Parsetree.pstr_desc = copy_structure_item_desc_with_loc ~loc pstr_desc; @@ -585,8 +585,8 @@ and copy_structure_item_desc_with_loc ~loc : Ast_504.Parsetree.Pstr_include (copy_include_declaration x0) | Ast_503.Parsetree.Pstr_attribute x0 -> Ast_504.Parsetree.Pstr_attribute (copy_attribute x0) - | Ast_503.Parsetree.Pstr_extension (({txt; _}, payload), []) - when String.equal txt Encoding_504.Ext_name.bivariant_pstr -> + | Ast_503.Parsetree.Pstr_extension (({ txt; _ }, payload), []) + when String.equal txt Encoding_504.Ext_name.bivariant_pstr -> let desc = Encoding_504.To_503.decode_bivariant_pstr ~loc payload in copy_structure_item_desc_with_loc ~loc desc | Ast_503.Parsetree.Pstr_extension (x0, x1) -> @@ -1176,15 +1176,11 @@ and copy_extension_constructor_kind : and copy_type_params params = List.map (fun ((typ, (var, inj)) as param) -> - match Encoding_504.To_503.decode_bivariant_param param with - | Some (typ, inj) -> - ( copy_core_type typ - , (Ast_504.Asttypes.Bivariant, copy_injectivity inj) - ) - | None -> - ( copy_core_type typ - , (copy_variance var, copy_injectivity inj) - )) + match Encoding_504.To_503.decode_bivariant_param param with + | Some (typ, inj) -> + ( copy_core_type typ, + (Ast_504.Asttypes.Bivariant, copy_injectivity inj) ) + | None -> (copy_core_type typ, (copy_variance var, copy_injectivity inj))) params and copy_type_declaration : File "astlib/migrate_504_503.ml", line 1, characters 0-0: diff --git a/_build/default/astlib/migrate_504_503.ml b/_build/default/astlib/.formatted/migrate_504_503.ml index 09dc5d4..3ce9592 100644 --- a/_build/default/astlib/migrate_504_503.ml +++ b/_build/default/astlib/.formatted/migrate_504_503.ml @@ -8,7 +8,7 @@ module Bivariant_param = struct | Type_decl of Ast_503.Parsetree.type_declaration | Type_decl_list of Ast_503.Parsetree.type_declaration list -(* TODO: register exception printers to display those as location errors + (* TODO: register exception printers to display those as location errors pointing to the right AST element and displaying a clear migration error message *) end @@ -535,7 +535,7 @@ and copy_structure : Ast_504.Parsetree.structure -> Ast_503.Parsetree.structure and copy_structure_item : Ast_504.Parsetree.structure_item -> Ast_503.Parsetree.structure_item = fun { Ast_504.Parsetree.pstr_desc; Ast_504.Parsetree.pstr_loc } -> - let loc = copy_location pstr_loc in + let loc = copy_location pstr_loc in { Ast_503.Parsetree.pstr_desc = copy_structure_item_desc_with_loc ~loc pstr_desc; @@ -552,13 +552,12 @@ and copy_structure_item_desc_with_loc ~loc : (copy_rec_flag x0, List.map copy_value_binding x1) | Ast_504.Parsetree.Pstr_primitive x0 -> Ast_503.Parsetree.Pstr_primitive (copy_value_description x0) - | Ast_504.Parsetree.Pstr_type (x0, x1) -> - let rec_flag = copy_rec_flag x0 in - (match copy_type_declaration_list x1 with - | tds -> - Ast_503.Parsetree.Pstr_type (rec_flag, tds) - | exception Bivariant_param.Type_decl_list tds -> - Encoding_504.To_503.encode_bivariant_pstr_type ~loc rec_flag tds) + | Ast_504.Parsetree.Pstr_type (x0, x1) -> ( + let rec_flag = copy_rec_flag x0 in + match copy_type_declaration_list x1 with + | tds -> Ast_503.Parsetree.Pstr_type (rec_flag, tds) + | exception Bivariant_param.Type_decl_list tds -> + Encoding_504.To_503.encode_bivariant_pstr_type ~loc rec_flag tds) | Ast_504.Parsetree.Pstr_typext x0 -> Ast_503.Parsetree.Pstr_typext (copy_type_extension x0) | Ast_504.Parsetree.Pstr_exception x0 -> @@ -1164,15 +1163,15 @@ and copy_type_params params = let params' = List.map (fun (typ, (variance, injectivity)) -> - let typ' = copy_core_type typ in - let injectivity' = copy_injectivity injectivity in - try (typ', (copy_variance variance, injectivity')) - with Bivariant_param.T -> - contains_bivariant_param := true; - Encoding_504.To_503.encode_bivariant_param typ' injectivity') + let typ' = copy_core_type typ in + let injectivity' = copy_injectivity injectivity in + try (typ', (copy_variance variance, injectivity')) + with Bivariant_param.T -> + contains_bivariant_param := true; + Encoding_504.To_503.encode_bivariant_param typ' injectivity') params in - params', !contains_bivariant_param + (params', !contains_bivariant_param) and copy_type_declaration : Ast_504.Parsetree.type_declaration -> Ast_503.Parsetree.type_declaration = @@ -1186,46 +1185,43 @@ and copy_type_declaration : Ast_504.Parsetree.ptype_attributes; Ast_504.Parsetree.ptype_loc; } -> - let params, contains_bivariant = copy_type_params ptype_params in - let td = - { - Ast_503.Parsetree.ptype_name = copy_loc (fun x -> x) ptype_name; - Ast_503.Parsetree.ptype_params = params; - Ast_503.Parsetree.ptype_cstrs = - List.map - (fun x -> - let x0, x1, x2 = x in - (copy_core_type x0, copy_core_type x1, copy_location x2)) - ptype_cstrs; - Ast_503.Parsetree.ptype_kind = copy_type_kind ptype_kind; - Ast_503.Parsetree.ptype_private = copy_private_flag ptype_private; - Ast_503.Parsetree.ptype_manifest = Option.map copy_core_type ptype_manifest; - Ast_503.Parsetree.ptype_attributes = copy_attributes ptype_attributes; - Ast_503.Parsetree.ptype_loc = copy_location ptype_loc; - } - in - if contains_bivariant then - raise (Bivariant_param.Type_decl td) - else - td + let params, contains_bivariant = copy_type_params ptype_params in + let td = + { + Ast_503.Parsetree.ptype_name = copy_loc (fun x -> x) ptype_name; + Ast_503.Parsetree.ptype_params = params; + Ast_503.Parsetree.ptype_cstrs = + List.map + (fun x -> + let x0, x1, x2 = x in + (copy_core_type x0, copy_core_type x1, copy_location x2)) + ptype_cstrs; + Ast_503.Parsetree.ptype_kind = copy_type_kind ptype_kind; + Ast_503.Parsetree.ptype_private = copy_private_flag ptype_private; + Ast_503.Parsetree.ptype_manifest = + Option.map copy_core_type ptype_manifest; + Ast_503.Parsetree.ptype_attributes = copy_attributes ptype_attributes; + Ast_503.Parsetree.ptype_loc = copy_location ptype_loc; + } + in + if contains_bivariant then raise (Bivariant_param.Type_decl td) else td and copy_type_declaration_list : - Ast_504.Parsetree.type_declaration list -> - Ast_503.Parsetree.type_declaration list = fun l -> + Ast_504.Parsetree.type_declaration list -> + Ast_503.Parsetree.type_declaration list = + fun l -> let contains_bivariant_param = ref false in let tds = List.map (fun td -> - try copy_type_declaration td - with Bivariant_param.Type_decl td' -> - contains_bivariant_param := true; - td') + try copy_type_declaration td + with Bivariant_param.Type_decl td' -> + contains_bivariant_param := true; + td') l in - if !contains_bivariant_param then - raise (Bivariant_param.Type_decl_list tds) - else - tds + if !contains_bivariant_param then raise (Bivariant_param.Type_decl_list tds) + else tds and copy_private_flag : Ast_504.Asttypes.private_flag -> Ast_503.Asttypes.private_flag = function dune build @fmt failed "/usr/bin/env" "bash" "-c" "opam exec -- dune build @fmt --ignore-promoted-rules || (echo "dune build @fmt failed"; exit 2)" failed with exit status 2 2026-03-02 11:04.26: Job failed: Failed: Build failed