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.

toml: rename from tomlt, split raw AST into Value submodule

Drops the "t" suffix and follows the value/codec/toml/core pattern
(jsont.json_base style). The internal raw TOML module moves from
[Toml] to [Value] (file: lib/value.ml, was lib/toml.ml) to make room
for the top-level Toml facade (file: lib/toml.ml, was lib/tomlt.ml).

External callers now reach the raw AST through [Toml.Value.X] instead
of [Tomlt.Toml.X]. Every downstream reference updated in lockstep.

+22 -22
+2 -2
TODO.md
··· 130 130 131 131 ### Phase 2 — Org-level ACL + admin-as-org 132 132 133 - - `tomlt`-based parser for `admin.toml` and `<org>/meta/config:main: 133 + - `toml`-based parser for `admin.toml` and `<org>/meta/config:main: 134 134 org.toml`. 135 135 - Resolver `can : action -> owner -> user -> bool`. 136 136 - Derived rule: `user.gh_login == org.name ⇒ implicit admin`. ··· 240 240 invent a new ref namespace. 241 241 - No `Irmin_refname` module — inline the regex. 242 242 - `Atomic.t` for config swap — good, no locks. 243 - - Use `tomlt`, don't hand-roll TOML. 243 + - Use `toml`, don't hand-roll TOML. 244 244 - On parse error: previous config stays live; explicit, not implicit. 245 245 246 246 **Miod**:
+1 -1
lib/admin/dune
··· 1 1 (library 2 2 (name irmin_admin) 3 3 (public_name irmin.admin) 4 - (libraries tomlt tomlt.bytesrw)) 4 + (libraries toml toml.bytesrw))
+5 -5
lib/admin/irmin_admin.ml
··· 5 5 let empty = { allow_emails = [] } 6 6 7 7 let parse text = 8 - match Tomlt_bytesrw.decode_string Tomlt.value text with 8 + match Toml_bytesrw.decode_string Toml.value text with 9 9 | Error _ -> empty 10 - | Ok (Tomlt.Toml.Table fields) -> ( 10 + | Ok (Toml.Value.Table fields) -> ( 11 11 match List.assoc_opt "allow" fields with 12 - | Some (Tomlt.Toml.Array entries) -> 12 + | Some (Toml.Value.Array entries) -> 13 13 let emails = 14 14 List.filter_map 15 15 (function 16 - | Tomlt.Toml.Table kvs -> ( 16 + | Toml.Value.Table kvs -> ( 17 17 match List.assoc_opt "email" kvs with 18 - | Some (Tomlt.Toml.String s) -> Some s 18 + | Some (Toml.Value.String s) -> Some s 19 19 | _ -> None) 20 20 | _ -> None) 21 21 entries
+1 -1
lib/toml/dune
··· 1 1 (library 2 2 (name irmin_toml) 3 3 (public_name irmin.toml) 4 - (libraries irmin tomlt digestif)) 4 + (libraries irmin toml digestif))
+13 -13
lib/toml/irmin_toml.ml
··· 4 4 5 5 (* Round-trip a single TOML value through its string form, keyed "_" at the 6 6 top so we can re-parse it as a stand-alone document. *) 7 - let enc (v : Tomlt.Toml.t) : string = 7 + let enc (v : Toml.Value.t) : string = 8 8 match v with 9 - | Tomlt.Toml.Table _ -> Tomlt.encode_string Tomlt.value v 9 + | Toml.Value.Table _ -> Toml.encode_string Toml.value v 10 10 | _ -> 11 11 (* Scalars and arrays need to be wrapped; use a dummy key. *) 12 - Tomlt.encode_string Tomlt.value (Tomlt.Toml.Table [ ("_", v) ]) 12 + Toml.encode_string Toml.value (Toml.Value.Table [ ("_", v) ]) 13 13 14 - let dec (s : string) : Tomlt.Toml.t = 15 - match Tomlt.decode_string Tomlt.value s with 16 - | Ok (Tomlt.Toml.Table [ ("_", v) ]) -> v 14 + let dec (s : string) : Toml.Value.t = 15 + match Toml.decode_string Toml.value s with 16 + | Ok (Toml.Value.Table [ ("_", v) ]) -> v 17 17 | Ok v -> v 18 - | Error _ -> Tomlt.Toml.Table [] 18 + | Error _ -> Toml.Value.Table [] 19 19 20 20 let parse : S.dec = 21 21 fun block -> 22 22 match dec block with 23 - | Tomlt.Toml.Table pairs -> 23 + | Toml.Value.Table pairs -> 24 24 S.Named (List.map (fun (k, v) -> (k, `Inline (enc v))) pairs) 25 - | Tomlt.Toml.Array items -> 25 + | Toml.Value.Array items -> 26 26 S.Indexed 27 27 (Array.of_list (List.map (fun v -> (`Inline (enc v) : S.child)) items)) 28 28 | _ -> S.Named [] ··· 35 35 let v = 36 36 match child with 37 37 | `Inline data -> dec data 38 - | `Link _ -> Tomlt.Toml.Table [] 38 + | `Link _ -> Toml.Value.Table [] 39 39 in 40 40 (name, v)) 41 41 children 42 42 in 43 - enc (Tomlt.Toml.Table pairs) 43 + enc (Toml.Value.Table pairs) 44 44 | S.Indexed children -> 45 45 let items = 46 46 Array.to_list ··· 48 48 (fun child -> 49 49 match child with 50 50 | `Inline data -> dec data 51 - | `Link _ -> Tomlt.Toml.Table []) 51 + | `Link _ -> Toml.Value.Table []) 52 52 children) 53 53 in 54 - enc (Tomlt.Toml.Array items) 54 + enc (Toml.Value.Array items) 55 55 56 56 let ( => ) = S.( => ) 57 57