OCaml library and CLI for OCI and Docker image manipulation
0
fork

Configure Feed

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

encodings: document and apply Error builder/raiser pair convention

Per the updated ocaml-encodings skill, every typed error helper ships
as a pair: [foo meta ~args] builds a [t], [fail_foo meta ~args]
raises it. Callers can either accumulate errors (build only) or
abort immediately (raise) without the vocabulary fragmenting.

- SKILL.md: document the convention in the Error section.
- loc/README.md: clarify that [exception Loc.Error] is the single
shared raise site and re-exports use the pair naming.
- loc/test/test_loc.ml: rename test cases to the [fail_*] verbs
(Error.fail_expected, Error.fail_push_array).
- xml/xml.mli: update the Error facade doc to point at
[Error.fail_sort] / [Error.fail_kinded_sort] (the raising verbs)
rather than [sort] / [kinded_sort] (the builders).
- oci/spec/error.ml: use [Json.Error.failf] instead of [fail] + an
intermediate format, keeping the structured path/meta.
- json/sort.mli: tiny docstring cleanup ({!Loc.Path} -> "path").

+1 -1
+1 -1
lib/spec/error.ml
··· 68 68 to abort the decode. We pipe them through [Json.Error.failf] so the structured 69 69 path/meta survives; the message carries the OCI-specific text. *) 70 70 71 - let fail_in_codec meta t = Json.Error.fail meta (to_string t) 71 + let fail_in_codec meta t = Json.Error.failf meta "%s" (to_string t)