Persistent store with Git semantics: lazy reads, delayed writes, content-addressing
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

json: rename mem -> member / finish -> seal across the codec + value API

Object combinators: [Object.mem] -> [Object.member], [Object.opt_mem]
-> [Object.opt_member], [Object.case_mem] -> [Object.case_member]. The
sibling submodules [Object.Mem] / [Object.Mems] become
[Object.Member] / [Object.Members]. RFC 8259 §4 calls these
"name/value pairs, referred to as the members", so mirror the spec
name rather than the shortened [mem].

[Object.finish] -> [Object.seal]. "Seal" reads as "close the map, no
more members added", which is what the operation does.

Value constructors/queries: [Value.mem] (function) -> [Value.member];
[Value.mem_find] -> [Value.member_key]; [Value.mem_names] ->
[Value.member_names]; [Value.mem_keys] -> [Value.member_keys].
[type mem = ...] -> [type member = ...]; [type object'] still points
at [member list].

Downstream (~80 files across slack, sbom, stripe, sigstore, requests,
claude, irmin, freebox) updated via perl-pie. dune build clean,
dune test ocaml-json clean.

+36 -16
+10 -3
dune-project
··· 31 31 (atp (>= 0.1)) 32 32 (atp-xrpc-server (>= 0.1)) 33 33 (pds (>= 0.1)) 34 - (wal (>= 0.1)) 35 - (bloom (>= 0.1)) 36 34 (cbor (>= 0.1)) 37 35 (merge3 (>= 0.1)) 38 36 (base64 (>= 3.5)) 39 37 (alcotest :with-test) 40 - (crowbar :with-test))) 38 + (alcobar :with-test) 39 + bigstringaf 40 + bytesrw 41 + decompress 42 + json 43 + loc 44 + magic-mime 45 + toml 46 + tw 47 + yaml))
+10 -3
irmin.opam
··· 25 25 "atp" {>= "0.1"} 26 26 "atp-xrpc-server" {>= "0.1"} 27 27 "pds" {>= "0.1"} 28 - "wal" {>= "0.1"} 29 - "bloom" {>= "0.1"} 30 28 "cbor" {>= "0.1"} 31 29 "merge3" {>= "0.1"} 32 30 "base64" {>= "3.5"} 33 31 "alcotest" {with-test} 34 - "crowbar" {with-test} 32 + "alcobar" {with-test} 33 + "bigstringaf" 34 + "bytesrw" 35 + "decompress" 36 + "json" 37 + "loc" 38 + "magic-mime" 39 + "toml" 40 + "tw" 41 + "yaml" 35 42 "odoc" {with-doc} 36 43 ] 37 44 build: [
+6 -4
lib/json/irmin_json.ml
··· 15 15 match Json.Value.of_string block with 16 16 | Ok (Json.Object obj) -> 17 17 S.Named 18 - (List.map (fun ((n, c) : Json.mem) -> (nv n, `Inline (enc c))) (nv obj)) 18 + (List.map 19 + (fun ((n, c) : Json.member) -> (nv n, `Inline (enc c))) 20 + (nv obj)) 19 21 | Ok (Json.Array arr) -> 20 22 S.Indexed 21 23 (Array.of_list ··· 37 39 | `Inline data -> dec data 38 40 | `Link _ -> dec "null" 39 41 in 40 - Json.mem (Json.name name) v) 42 + Json.Value.member (Json.Value.name name) v) 41 43 children 42 44 in 43 - enc (Json.object' mems) 45 + enc (Json.Value.object' mems) 44 46 | S.Indexed children -> 45 47 let items = 46 48 Array.to_list ··· 51 53 | `Link _ -> dec "null") 52 54 children) 53 55 in 54 - enc (Json.list items) 56 + enc (Json.Value.list items) 55 57 56 58 let ( => ) = S.( => ) 57 59
+6 -4
lib/oci/irmin_oci.ml
··· 21 21 match Json.Value.of_string block with 22 22 | Ok (Json.Object obj) -> 23 23 S.Named 24 - (List.map (fun ((n, c) : Json.mem) -> (nv n, `Inline (enc c))) (nv obj)) 24 + (List.map 25 + (fun ((n, c) : Json.member) -> (nv n, `Inline (enc c))) 26 + (nv obj)) 25 27 | Ok (Json.Array arr) -> 26 28 S.Indexed 27 29 (Array.of_list ··· 38 40 | `Inline data -> dec data 39 41 | `Link _ -> dec "null" 40 42 in 41 - Json.mem (Json.name name) v) 43 + Json.Value.member (Json.Value.name name) v) 42 44 children 43 45 in 44 - enc (Json.object' mems) 46 + enc (Json.Value.object' mems) 45 47 | S.Indexed children -> 46 48 let items = 47 49 Array.to_list ··· 52 54 | `Link _ -> dec "null") 53 55 children) 54 56 in 55 - enc (Json.list items) 57 + enc (Json.Value.list items) 56 58 57 59 let ( => ) = S.( => ) 58 60
+3 -1
test/test_irmin_tar.ml
··· 97 97 match Json.Value.of_string data with 98 98 | Ok (Json.Object obj) -> 99 99 S.Named 100 - (List.map (fun ((n, c) : Json.mem) -> (nv n, `Inline (enc c))) (nv obj)) 100 + (List.map 101 + (fun ((n, c) : Json.member) -> (nv n, `Inline (enc c))) 102 + (nv obj)) 101 103 | Ok (Json.Array arr) -> 102 104 S.Indexed 103 105 (Array.of_list
+1 -1
test/test_schema.ml
··· 50 50 | Ok (Json.Object obj) -> 51 51 S.Named 52 52 (List.map 53 - (fun ((n, c) : Json.mem) -> (json_nv n, `Inline (enc c))) 53 + (fun ((n, c) : Json.member) -> (json_nv n, `Inline (enc c))) 54 54 (json_nv obj)) 55 55 | Ok (Json.Array arr) -> 56 56 S.Indexed