2025-06-17 10:32.39: New job: test robur-coop/git-kv https://github.com/robur-coop/git-kv.git#refs/heads/fix-tests (5648b7554789f94468956fcc36a399ade479c812) (linux-x86_64:(lint-fmt))
Base: ocaml/opam:debian-12-ocaml-4.08@sha256:48fa4a7216c3973bb95572cf5dca98cbbcefe90f288f552e7ac70a8ccd438aa7
ocamlformat version: version 0.27.0 (from opam)
To reproduce locally:
git clone --recursive "https://github.com/robur-coop/git-kv.git" -b "fix-tests" && cd "git-kv" && git reset --hard 5648b755
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM ocaml/opam:debian-12-ocaml-4.08@sha256:48fa4a7216c3973bb95572cf5dca98cbbcefe90f288f552e7ac70a8ccd438aa7
USER 1000:1000
RUN cd ~/opam-repository && (git cat-file -e 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && git log --no-decorate -n1 --oneline && opam update -u
RUN opam depext -i dune
WORKDIR /src
RUN opam depext -i ocamlformat=0.27.0
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
2025-06-17 10:32.39: Using cache hint "robur-coop/git-kv-ocaml/opam:debian-12-ocaml-4.08@sha256:48fa4a7216c3973bb95572cf5dca98cbbcefe90f288f552e7ac70a8ccd438aa7-debian-12-4.08_opam-2.3-ocamlformat-0eea63ad71af2b1116c556023bedc6bf083e6125"
2025-06-17 10:32.39: Using OBuilder spec:
((from ocaml/opam:debian-12-ocaml-4.08@sha256:48fa4a7216c3973bb95572cf5dca98cbbcefe90f288f552e7ac70a8ccd438aa7)
(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 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && 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.27.0"))
(copy (src .) (dst /src/))
(run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)"))
)
2025-06-17 10:32.39: Waiting for resource in pool OCluster
2025-06-17 10:32.39: Waiting for worker…
2025-06-17 10:36.46: Got resource from pool OCluster
Building on asteria.caelum.ci.dev
All commits already cached
HEAD is now at 5648b75 Add a git-daemon-export-ok on cram tests
(from ocaml/opam:debian-12-ocaml-4.08@sha256:48fa4a7216c3973bb95572cf5dca98cbbcefe90f288f552e7ac70a8ccd438aa7)
2025-06-17 10:36.46 ---> using "d1b97f3f32fc7cff4791d73e3fff398d19cc5b0541c709028ff05a921e22d2c8" from cache
/: (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 0eea63ad71af2b1116c556023bedc6bf083e6125 || git fetch origin master) && git reset -q --hard 0eea63ad71af2b1116c556023bedc6bf083e6125 && git log --no-decorate -n1 --oneline && opam update -u"))
From https://github.com/ocaml/opam-repository
* branch master -> FETCH_HEAD
0d013e603b..c7269f729a master -> origin/master
0eea63ad71 Merge pull request #27946 from mtelvers/opam-publish-ocaml-version.4.0.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
2025-06-17 10:36.46 ---> using "96cf7cb4f290bdde63e0891300660f309335b98ec063b9c2de517b6b08952aac" from cache
/: (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.19.0
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[dune.3.19.0] found in cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed dune.3.19.0
Done.
# Run eval $(opam env) to update the current shell environment
2025-06-17 10:36.46 ---> using "89c0585fea6e0efe18837c1dd4fe4772483d123bc62d2e4be11e9db74e5475f0" from cache
/: (workdir /src)
/src: (run (cache (opam-archives (target /home/opam/.opam/download-cache)))
(network host)
(shell "opam depext -i ocamlformat=0.27.0"))
# 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 cmdliner 1.3.0 [required by ocamlformat]
- install menhirLib 20240715 [required by ocamlformat-lib]
- install menhirCST 20240715 [required by menhir]
- install ocamlbuild 0.16.1 [required by fpath, astring, uuseg]
- install menhirSdk 20240715 [required by ocamlformat-lib]
- install either 1.0.0 [required by ocamlformat-lib]
- install ocaml-version 4.0.1 [required by ocamlformat-lib]
- install camlp-streams 5.0.1 [required by ocamlformat-lib]
- install csexp 1.5.2 [required by ocamlformat]
- install seq base [required by re]
- install fix 20250428 [required by ocamlformat-lib]
- install ocamlfind 1.9.8 [required by ocp-indent, astring, fpath, uuseg]
- install dune-build-info 3.19.0 [required by ocamlformat-lib]
- install menhir 20240715 [required by ocamlformat-lib]
- install dune-configurator 3.19.0 [required by base]
- install re 1.11.0 [required by ocamlformat]
- install topkg 1.0.8 [required by fpath, astring, uuseg]
- install base-bytes base [required by ocp-indent]
- 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 ocp-indent 1.8.1 [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.27.0 [required by ocamlformat]
- install ocamlformat 0.27.0
===== 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.1.3.0] found in cache
[csexp.1.5.2] found in cache
[dune-build-info.3.19.0] found in cache
[dune-configurator.3.19.0] found in cache
[either.1.0.0] found in cache
[fix.20250428] found in cache
[fpath.0.7.3] found in cache
[menhir.20240715] found in cache
[menhirCST.20240715] found in cache
[menhirLib.20240715] found in cache
[menhirSdk.20240715] found in cache
[ocaml-version.4.0.1] found in cache
[ocamlbuild.0.16.1] found in cache
[ocamlfind.1.9.8] found in cache
[ocamlformat.0.27.0] found in cache
[ocamlformat-lib.0.27.0] found in cache
[ocp-indent.1.8.1] 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.0.8] 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 cmdliner.1.3.0
-> installed either.1.0.0
-> installed fix.20250428
-> installed menhirCST.20240715
-> installed menhirLib.20240715
-> installed menhirSdk.20240715
-> installed ocaml-version.4.0.1
-> installed re.1.11.0
-> installed sexplib0.v0.14.0
-> installed dune-build-info.3.19.0
-> installed dune-configurator.3.19.0
-> installed ocamlfind.1.9.8
-> installed base-bytes.base
-> installed ocamlbuild.0.16.1
-> installed ocp-indent.1.8.1
-> installed base.v0.14.3
-> installed topkg.1.0.8
-> installed stdio.v0.14.0
-> installed uutf.1.0.4
-> installed astring.0.8.5
-> installed menhir.20240715
-> installed fpath.0.7.3
-> installed uucp.15.0.0
-> installed uuseg.15.0.0
-> installed ocamlformat-lib.0.27.0
-> installed ocamlformat.0.27.0
Done.
<><> ocp-indent.1.8.1 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
2025-06-17 10:36.46 ---> using "3806f45ef51bb70dc27c6783fa556ac6054f53765f6f6e5d7f0761003690b07c" from cache
/src: (copy (src .) (dst /src/))
2025-06-17 10:36.47 ---> saved as "9fc1208cd2d3cf9185e3bc3b91a00ced1a14ec939d7f4f78b12dcfa043b4ad7b"
/src: (run (shell "opam exec -- dune build @fmt --ignore-promoted-rules || (echo \"dune build @fmt failed\"; exit 2)"))
File "src/git_kv.mli", line 1, characters 0-0:
diff --git a/_build/default/src/git_kv.mli b/_build/default/src/.formatted/git_kv.mli
index e675dd8..9f5ea98 100644
--- a/_build/default/src/git_kv.mli
+++ b/_build/default/src/.formatted/git_kv.mli
@@ -93,9 +93,17 @@ val change_and_push :
[message] (committer will be the same as author), and pushes that commit to
the remote. *)
-val get_with_permissions : t -> Mirage_kv.Key.t -> ([ `Normal | `Exec | `Everybody | `Link] * string, error) result Lwt.t
+val get_with_permissions :
+ t ->
+ Mirage_kv.Key.t ->
+ ([ `Normal | `Exec | `Everybody | `Link ] * string, error) result Lwt.t
(** [get_with_permissions t key] is similar to [get t key] with the file
permissions. Unlike [get] symbolic links are {b not} ignored. *)
-val set_with_permissions : t -> Mirage_kv.Key.t -> [ `Normal | `Exec | `Everybody | `Link] * string -> (unit, write_error) result Lwt.t
-(** [set_with_permissions t key (perm, data)] is [set t key data] with [perm] git file permissions. *)
+val set_with_permissions :
+ t ->
+ Mirage_kv.Key.t ->
+ [ `Normal | `Exec | `Everybody | `Link ] * string ->
+ (unit, write_error) result Lwt.t
+(** [set_with_permissions t key (perm, data)] is [set t key data] with [perm]
+ git file permissions. *)
File "src/search/git_search.ml", line 1, characters 0-0:
diff --git a/_build/default/src/search/git_search.ml b/_build/default/src/search/.formatted/git_search.ml
index e76fc5a..a58bd9e 100644
--- a/_build/default/src/search/git_search.ml
+++ b/_build/default/src/search/.formatted/git_search.ml
@@ -64,9 +64,9 @@ let find_tag l =
| _ -> None)
let find_tree l elts =
- List.find_map (function
- | `Tree (s, x, perm) -> if s = l then Some (x, perm) else None
- | _ -> None)
+ List.find_map
+ (function
+ | `Tree (s, x, perm) -> if s = l then Some (x, perm) else None | _ -> None)
elts
let rec find t hash path =
File "app/mgit.ml", line 1, characters 0-0:
diff --git a/_build/default/app/mgit.ml b/_build/default/app/.formatted/mgit.ml
index 49dfd9b..f7a94e8 100644
--- a/_build/default/app/mgit.ml
+++ b/_build/default/app/.formatted/mgit.ml
@@ -42,7 +42,9 @@ let get ~quiet store key =
let get_with_permissions ~quiet store key =
Git_kv.get_with_permissions store key >>= function
| Ok (perm, contents) when not quiet ->
- Fmt.pr "%a@ @[<hov>%a@]\n%!" pp_perm perm (Hxd_string.pp Hxd.default) contents;
+ Fmt.pr "%a@ @[<hov>%a@]\n%!" pp_perm perm
+ (Hxd_string.pp Hxd.default)
+ contents;
Lwt.return (Ok 0)
| Ok _ -> Lwt.return (Ok 0)
| Error err ->
@@ -88,13 +90,13 @@ let set_partial ~quiet store key off str =
| Some off when off < 0 ->
if not quiet then Fmt.epr "Negative offset %d.\n%!" off;
Lwt.return (Ok 1)
- | Some offset ->
+ | Some offset -> (
let offset = Optint.Int63.of_int offset in
Git_kv.set_partial store key ~offset value >>= function
| Ok () -> Lwt.return (Ok 0)
| Error err ->
if not quiet then Fmt.epr "%a.\n%!" Git_kv.pp_write_error err;
- Lwt.return (Ok 1)
+ Lwt.return (Ok 1))
let set_with_permissions ~quiet store key perm str =
let perm =
@@ -104,7 +106,8 @@ let set_with_permissions ~quiet store key perm str =
| "a" -> `Everybody
| "l" -> `Link
| _ ->
- if not quiet then Fmt.epr "Unknown permission %S, assuming \"n\" (normal).\n%!" perm;
+ if not quiet then
+ Fmt.epr "Unknown permission %S, assuming \"n\" (normal).\n%!" perm;
`Normal
in
let value = value_of_string str in
@@ -122,12 +125,12 @@ let allocate ?last_modified ~quiet store key size =
| Some size when Optint.Int63.compare size Optint.Int63.zero < 0 ->
if not quiet then Fmt.epr "Negative size %a.\n%!" Optint.Int63.pp size;
Lwt.return (Ok 1)
- | Some size ->
+ | Some size -> (
Git_kv.allocate store key ?last_modified size >>= function
| Ok () -> Lwt.return (Ok 0)
| Error err ->
if not quiet then Fmt.epr "%a.\n%!" Git_kv.pp_write_error err;
- Lwt.return (Ok 1)
+ Lwt.return (Ok 1))
let remove ~quiet store key =
Git_kv.remove store key >>= function
@@ -227,8 +230,8 @@ let repl store fd_in =
with_key ~f:(get ~quiet:false store0) key >|= ignore >>= fun () ->
go store0
| ["get-with-permissions"; key] ->
- with_key ~f:(get_with_permissions ~quiet:false store0) key >|= ignore >>= fun () ->
- go store0
+ with_key ~f:(get_with_permissions ~quiet:false store0) key >|= ignore
+ >>= fun () -> go store0
| ["exists"; key] ->
with_key ~f:(exists ~quiet:false store0) key >|= ignore >>= fun () ->
go store0
@@ -238,26 +241,31 @@ let repl store fd_in =
>>= fun () -> go store0
| "set_partial" :: key :: off :: data ->
let data = String.concat " " data in
- with_key ~f:(fun key -> set_partial ~quiet:false store0 key off data) key >|= ignore
+ with_key ~f:(fun key -> set_partial ~quiet:false store0 key off data) key
+ >|= ignore
>>= fun () -> go store0
| "set-with-permissions" :: key :: perm :: data ->
let data = String.concat " " data in
- with_key ~f:(fun key -> set_with_permissions ~quiet:false store0 key perm data) key >|= ignore
+ with_key
+ ~f:(fun key -> set_with_permissions ~quiet:false store0 key perm data)
+ key
+ >|= ignore
>>= fun () -> go store0
| ["allocate"; key; sz] ->
- with_key ~f:(fun key -> allocate ~quiet:false store0 key sz) key >|= ignore
+ with_key ~f:(fun key -> allocate ~quiet:false store0 key sz) key
+ >|= ignore
>>= fun () -> go store0
| ["remove"; key] ->
with_key ~f:(remove ~quiet:false store0) key >|= ignore >>= fun () ->
go store0
| ["rename"; key; key'] ->
(match Mirage_kv.Key.v key, Mirage_kv.Key.v key' with
- | key, key' ->
- rename ~quiet:false store0 key key'
- | exception _ ->
- Fmt.epr "Invalid key: %S or %S\n%!" key key';
- Lwt.return (Ok 1)) >|= ignore >>= fun () ->
- go store0
+ | key, key' -> rename ~quiet:false store0 key key'
+ | exception _ ->
+ Fmt.epr "Invalid key: %S or %S\n%!" key key';
+ Lwt.return (Ok 1))
+ >|= ignore
+ >>= fun () -> go store0
| ["list"; key] ->
with_key ~f:(list ~quiet:false store0) key >|= ignore >>= fun () ->
go store0
@@ -265,11 +273,11 @@ let repl store fd_in =
with_key ~f:(last_modified ~quiet:false store0) key >|= ignore
>>= fun () -> go store0
| ["digest"; key] ->
- with_key ~f:(digest ~quiet:false store0) key >|= ignore
- >>= fun () -> go store0
+ with_key ~f:(digest ~quiet:false store0) key >|= ignore >>= fun () ->
+ go store0
| ["size"; key] ->
- with_key ~f:(size ~quiet:false store0) key >|= ignore
- >>= fun () -> go store0
+ with_key ~f:(size ~quiet:false store0) key >|= ignore >>= fun () ->
+ go store0
| ["pull"] ->
if is_a_tty then Fmt.pr "\n%!";
pull ~quiet:false store0 >|= ignore >>= fun () -> go store0
File "src/git_kv.ml", line 1, characters 0-0:
diff --git a/_build/default/src/git_kv.ml b/_build/default/src/.formatted/git_kv.ml
index 8187657..1fc7ffe 100644
--- a/_build/default/src/git_kv.ml
+++ b/_build/default/src/.formatted/git_kv.ml
@@ -358,8 +358,11 @@ let get_with_permissions t key =
let open Lwt.Infix in
get_with_permissions t key >|= function
| Ok ((`Commit | `Dir), _) -> assert false
- | Ok ((`Normal | `Exec | `Everybody | `Link as perm : [> `Normal | `Exec | `Everybody | `Link]), data) ->
- Ok ((perm :> [`Normal | `Exec | `Everybody | `Link]), data)
+ | Ok
+ ( ((`Normal | `Exec | `Everybody | `Link) as perm :
+ [> `Normal | `Exec | `Everybody | `Link ]),
+ data ) ->
+ Ok ((perm :> [ `Normal | `Exec | `Everybody | `Link ]), data)
| Error _ as e -> e
let get t key =
@@ -389,11 +392,11 @@ let list t key =
let r =
List.filter_map
(fun {Git_store.Tree.perm; name; _} ->
- let path = Mirage_kv.Key.add key name in
- match perm with
- | `Commit | `Dir -> Some (path, `Dictionary)
- | `Everybody | `Exec | `Normal -> Some (path, `Value)
- | `Link -> None)
+ let path = Mirage_kv.Key.add key name in
+ match perm with
+ | `Commit | `Dir -> Some (path, `Dictionary)
+ | `Everybody | `Exec | `Normal -> Some (path, `Value)
+ | `Link -> None)
(Git_store.Tree.to_list t)
in
Lwt.return (Ok r)
@@ -437,8 +440,8 @@ let digest t key =
>>= Option.fold
~none:(Lwt.return (Error (`Not_found key)))
~some:(function
- | `Link, _ -> Lwt.return (Error (`Value_expected key))
- | _, x -> Lwt.return (Ok (SHA1.to_raw_string x)))
+ | `Link, _ -> Lwt.return (Error (`Value_expected key))
+ | _, x -> Lwt.return (Ok (SHA1.to_raw_string x)))
let size t key =
let open Lwt_result.Infix in
@@ -524,7 +527,9 @@ let set_with_permissions ?and_commit t key (perm, contents) =
Git_store.write t.store (Git_store.Object.Blob blob) |> Lwt.return
>>= fun hash ->
tree_root_hash_of_store t >>= fun tree_root_hash ->
- unroll_tree t ~tree_root_hash ((perm :> Git_store.Tree.perm), name, hash) (List.tl rpath)
+ unroll_tree t ~tree_root_hash
+ ((perm :> Git_store.Tree.perm), name, hash)
+ (List.tl rpath)
>>= fun tree_root_hash ->
match and_commit with
| Some _old_tree_root_hash ->
@@ -567,10 +572,10 @@ let to_write_error (error : Git_store.error) =
let set_with_permissions t key v =
let open Lwt.Infix in
- set_with_permissions ?and_commit:t.committed t key v >|= Result.map_error to_write_error
+ set_with_permissions ?and_commit:t.committed t key v
+ >|= Result.map_error to_write_error
-let set t key contents =
- set_with_permissions t key (`Normal, contents)
+let set t key contents = set_with_permissions t key (`Normal, contents)
let set_partial t key ~offset chunk =
let open Lwt_result.Infix in
@@ -752,8 +757,7 @@ let rename t ~source ~dest =
let open Lwt_result.Infix in
let op t =
get_with_permissions t source >>= fun (perm, contents) ->
- remove t source >>= fun () ->
- set_with_permissions t dest (perm, contents)
+ remove t source >>= fun () -> set_with_permissions t dest (perm, contents)
in
(* (hannes) we check whether we're in a change_and_push or not, since
nested change_and_push are not supported. *)
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
2025-06-17 10:36.48: Job failed: Failed: Build failed