HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
0
fork

Configure Feed

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

csvt: use Textloc.Error.t natively with Path/Sort context

Same refactor pattern as xmlt (d786b041, 067b745c):

- Dropped the custom error ADT (Missing_header, Missing_column,
Bad_value, Truncated_row, Encode_error, Invalid_utf8), error_to_string,
pp_error.
- module Error = Textloc.Error (re-exports shared infrastructure).
- module Sort = Row | Field | Header with to_string, pp, kinded,
or_kind.
- Internal helpers raise Textloc.Error.msgf/msg; try/with at boundaries.
- decode/decode_string/decode_channel/decode_file/fold_channel/fold_file
now return (_, string) result.
- Added primed variants returning (_, Error.t) result.
- Path threading: push_array for row index, push_object for column
name -- errors carry structural context.
- Added ?max_rows / ?max_cols limits on decode.
- Kept Invalid_utf8_encode of int exception.

Tests tightened to STRUCTURAL assertions (exact frames list, exact
message) instead of substring checks.

Same tightening retrofitted to xmlt's context tests -- 12 tests
now assert exact Textloc.Error.t shape (full frame list including
outer-first ordering, exact message) rather than 'contains'.

Downstream fixes: ocaml-cdm collapses its typed error ADT to
[Parse_error of string]; 38 interop test files updated from
[Alcotest.failf "%a" Csvt.pp_error e] to ["%s" e].

csvt: 60 tests pass. xmlt: 177 tests pass.

+1 -1
+1 -1
test/interop/cryptography/test.ml
··· 60 60 let load_vectors () = 61 61 match Csvt.decode_file vector_codec (trace "vectors.csv") with 62 62 | Ok rows -> rows 63 - | Error e -> Alcotest.failf "CSV decode: %a" Csvt.pp_error e 63 + | Error e -> Alcotest.failf "CSV decode: %s" e 64 64 65 65 (* {1 Tests} *) 66 66