Monorepo management for opam overlays
0
fork

Configure Feed

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

meta,opam,csv,sexp,toml: migrate Error/Context/Path to new Loc shape

Every codec library now:
- aliases [type t = Loc.Error.t = { ctx; meta; kind }] so consumers can
destructure with [Error.Error { ctx; meta; kind }] patterns
- takes [~ctx] / [~meta] labelled args on v / msg / raise
- drops the library-local Context sub-module in favour of the top-level
Loc.Context
- flattens error.context via Loc.Context.frames (root-to-leaf
(sort, step) pairs), with wildcard arms for the extensible Path.step

Meta: meta_error.{ml,mli} -> error.{ml,mli}, Meta_error -> Error across
lib and tests; the public module remains [Meta.Error].

Opam, CSV, TOML, Sexp: test helpers use the new Context.frames accessor
+ extensible-step wildcard (|_ -> "?"). The CSV Json.Error.to_string
leak (legacy copy-paste) dropped in favour of raw string error.

+4 -9
+1 -3
bin/cmd_remove.ml
··· 75 75 sources_path sources' 76 76 with 77 77 | Ok () -> Fmt.pr "Updated sources.toml@." 78 - | Error e -> 79 - Fmt.epr "Warning: failed to update sources.toml: %s@." 80 - e) 78 + | Error e -> Fmt.epr "Warning: failed to update sources.toml: %s@." e) 81 79 | Error _ -> () 82 80 83 81 let commit_removal ~proc ~cwd dir =
+1 -2
lib/auto_resolve.ml
··· 4 4 5 5 module Log = (val Logs.src_log src : Logs.LOG) 6 6 7 - let err_decode e = 8 - Error (Fmt.str "decode failed: %s" (Json.Error.to_string e)) 7 + let err_decode e = Error (Fmt.str "decode failed: %s" (Json.Error.to_string e)) 9 8 10 9 type proposal = { 11 10 merged : string;
+1 -2
test/test_auto_resolve.ml
··· 15 15 client.AR.resolve_one ~path:"f" ~base:None ~ours:"" ~theirs:"" ~chunks 16 16 with 17 17 | Ok p -> p.AR.merged 18 - | Error e -> 19 - Alcotest.failf "client returned error: %s" e 18 + | Error e -> Alcotest.failf "client returned error: %s" e 20 19 21 20 let test_ours_picks_ours () = 22 21 let chunks =
+1 -2
test/test_deps.ml
··· 30 30 let path = Fpath.(target / "sources.toml") in 31 31 match SR.save ~fs path sources with 32 32 | Ok () -> () 33 - | Error e -> 34 - Alcotest.failf "failed to write sources.toml: %s" e 33 + | Error e -> Alcotest.failf "failed to write sources.toml: %s" e 35 34 36 35 let result_testable = 37 36 Alcotest.testable