commits
The READMEs all share the standard install/overlay snippet, but the
sh blocks lacked the "<!-- $MDX skip -->" directive. `dune test`
would shell out to `opam install` against the live switch, which
either prompts interactively or fails with a package conflict —
either way diffing as a test failure.
Bulk-add skip directives in front of every install/overlay block.
Also collapse the doubled "non-deterministic + skip" stack on three
READMEs (memtrace, ocaml-dpop, ocaml-pid1, ocaml-yaml, merlint) where
`skip` already implies the runtime is bypassed.
Each README's 'opam install <pkg>' instructions now match the post-rename
opam package names. Auto-generated by 'monopam lint --fix' after the
nox-* prefix landed on the underlying packages.
Renames 35 packages to make blacksun forks distinguishable from their
opam-repository upstreams. Module names (Git.x, Tls.x, ...) stay bare;
opam package names and dune (public_name) findlib references move to
nox-X. After this commit, zero local package names overlap with
opam-repository.
Renamed:
- nox-git, nox-irmin
- nox-crypto, nox-crypto-pk, nox-crypto-rng, nox-crypto-ec
- nox-tls, nox-tls-eio, nox-tar, nox-tar-eio, nox-tty, nox-tty-eio
- nox-arp, nox-ca-certs, nox-cbor, nox-cookie, nox-crc, nox-csv
- nox-gpt, nox-hkdf, nox-http, nox-jwt, nox-kdf, nox-loc
- nox-memtrace, nox-pds, nox-sexp, nox-slack, nox-toml
- nox-websocket, nox-x509, nox-xdge, nox-yaml
Also drops orphan tar-mirage and tar-unix opam templates that had no
matching package stanza.
Pure formatting changes from `dune fmt`: doc comment placement moves
from above the binding to below it for `type`s, multi-line `match`
expressions collapse onto one line where they fit, and infix operator
applications pick up spaces (`Soup.($?)` -> `Soup.( $? )`). No
semantic changes.
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").
Follow up to the loc/json reorg: the [textloc] field of [Meta] is
renamed to [loc] across every text-codec consumer. Pure mechanical
rename, no behaviour change.
Follow up to the module rename: update the remaining callers that
still referenced [Err] (library [claude.ml{,i}], [client.ml], the test
driver [test.ml]), and fix one stray [^ e] string concatenation in
hermest's CLI that needed [Json.Error.to_string e] now that
[Json.of_string] yields a structured error.
Pattern matches on Loc.Error use the record shape; Path.index becomes
Path.step (exhaustiveness: unknown steps pretty-print via Path.pp_step
rather than raising). Top-level Xml combinators moved into Xml.Codec;
consumers switch [open Xml] to [open Xml.Codec].
Context accessors: Context.frames (root-to-leaf pairs) /
Context.rev_frames (raw leaf-to-root). Path accessors: Path.steps /
Path.rev_steps, matching the same naming convention.
Cursor.to_context/of_context bridge to Loc.Context via
Path.steps + Context.push; the cursor frame list and the error
context spine remain the same spine.
Loc test renames rev_indices -> rev_steps; XML test 334/334 green.
Loc.Error.Context moves to top-level Loc.Context: the noun that cursors,
stream callbacks, and errors all speak is position-in-document, not
error-specific. Errors are one consumer of Context, alongside Cursor
and Stream.
Path.index becomes an extensible Path.step (Mem of string node | Nth of
int node baseline); formats add native addressing (Attribute,
Namespaced, Cbor_key, Field_number) via extension + register_step_printer.
Path.rev_indices -> Path.rev_steps; add Path.last, Path.to_list.
Error.t exposed as a record {ctx; meta; kind} so pattern matches
remain clean. Error.v/msg/raise take ~ctx ~meta labelled args.
JSON consumer: Json.Error.Context dropped; Json.Context aliases
Loc.Context. Query step fallback projects unknown steps to Mem via
Path.pp_step so foreign paths degrade to no-op queries instead of
failing.
Skill: Foo.Stream.fold/iter take (Loc.Context.t -> ...) callback
(one primitive, no _mem/_nth variants); transform takes f:(Context.t
-> [Copy|Edit|Drop]). Layer 3 documents extensible Path.step with
per-format native step examples.
Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:
- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.
Warnings 34 and 32, respectively. [type loc := t] in the Error module
is never referenced — the Meta module has a similar line that IS used
(Meta.make etc. return [loc]), so that one stays. [err_unexp] in
Path.parse was declared but never called from within the same module.
Drops the redundant "t" suffix. Library name, opam package, module
(Csvt -> Csv), and directory all rename in lockstep. Every downstream
reference in interop tests, libraries, and docs updated.
Loc.make and Loc.set_first/set_last previously took a (line_num,
byte_pos) tuple. Replace with four explicit labelled args
(first_line_num, first_line_byte, last_line_num, last_line_byte) so
call sites are self-documenting and harder to swap by mistake.
Likewise expose first_line_num / first_line_byte (etc.) accessors
instead of first_line / last_line returning the tuple.
Also rename Error.msgf to Error.failf to match the convention of
"raise" being implicit in the action verb (failf raises immediately;
msgf was historically a "wrap and raise" combinator that has the
same behaviour).
ocaml-csvt is the only in-repo consumer that still used the tuple
form; adapt csvt.ml to the new signature and the failf rename.
loc.ml now exposes [Error.v], [Error.msg], [Error.raise], [Error.fail],
[Error.failf] (old [msg]/[msgf] renamed to raise-flavour [fail]/[failf]).
Flattens [line_pos] pair into separate [first_line_num]/[first_line_byte]
fields to match the .mli.
Rename the shared location/error-infrastructure package to 'loc' (module
Loc), dropping the awkward 'textloc' / 'Textloc' naming. Consumers now
write [Sexpt.Meta], [Sexpt.Error], [Loc.t], etc.
- ocaml-textloc -> ocaml-loc (directory, opam, module).
- Dropped the single-function Sort_kind module; parsers inline the
one-liner at their local Sort.kinded definitions.
- Parser dunes use [(re_export loc)] so downstream consumers don't need
to declare loc in their own dune or opam.
- monopam lint: new [collect_exports] walks META [exports] fields
(dune's re_export metadata) and expands each opam package's
effective dep set with everything its declared deps re-export.
[Fl_split.in_words] replaces the ad-hoc whitespace splitter.
- merlint: drop 'loc' from its dune-project depends -- reaches via
sexpt re_export.
- Consumers (cdm, s3, test files) updated to [Loc.*] naming.
All 360 tests pass (26 loc + 177 xmlt + 60 csvt + 77 sexpt + 20
dune-codec).
The READMEs all share the standard install/overlay snippet, but the
sh blocks lacked the "<!-- $MDX skip -->" directive. `dune test`
would shell out to `opam install` against the live switch, which
either prompts interactively or fails with a package conflict —
either way diffing as a test failure.
Bulk-add skip directives in front of every install/overlay block.
Also collapse the doubled "non-deterministic + skip" stack on three
READMEs (memtrace, ocaml-dpop, ocaml-pid1, ocaml-yaml, merlint) where
`skip` already implies the runtime is bypassed.
Renames 35 packages to make blacksun forks distinguishable from their
opam-repository upstreams. Module names (Git.x, Tls.x, ...) stay bare;
opam package names and dune (public_name) findlib references move to
nox-X. After this commit, zero local package names overlap with
opam-repository.
Renamed:
- nox-git, nox-irmin
- nox-crypto, nox-crypto-pk, nox-crypto-rng, nox-crypto-ec
- nox-tls, nox-tls-eio, nox-tar, nox-tar-eio, nox-tty, nox-tty-eio
- nox-arp, nox-ca-certs, nox-cbor, nox-cookie, nox-crc, nox-csv
- nox-gpt, nox-hkdf, nox-http, nox-jwt, nox-kdf, nox-loc
- nox-memtrace, nox-pds, nox-sexp, nox-slack, nox-toml
- nox-websocket, nox-x509, nox-xdge, nox-yaml
Also drops orphan tar-mirage and tar-unix opam templates that had no
matching package stanza.
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").
Follow up to the module rename: update the remaining callers that
still referenced [Err] (library [claude.ml{,i}], [client.ml], the test
driver [test.ml]), and fix one stray [^ e] string concatenation in
hermest's CLI that needed [Json.Error.to_string e] now that
[Json.of_string] yields a structured error.
Pattern matches on Loc.Error use the record shape; Path.index becomes
Path.step (exhaustiveness: unknown steps pretty-print via Path.pp_step
rather than raising). Top-level Xml combinators moved into Xml.Codec;
consumers switch [open Xml] to [open Xml.Codec].
Context accessors: Context.frames (root-to-leaf pairs) /
Context.rev_frames (raw leaf-to-root). Path accessors: Path.steps /
Path.rev_steps, matching the same naming convention.
Cursor.to_context/of_context bridge to Loc.Context via
Path.steps + Context.push; the cursor frame list and the error
context spine remain the same spine.
Loc test renames rev_indices -> rev_steps; XML test 334/334 green.
Loc.Error.Context moves to top-level Loc.Context: the noun that cursors,
stream callbacks, and errors all speak is position-in-document, not
error-specific. Errors are one consumer of Context, alongside Cursor
and Stream.
Path.index becomes an extensible Path.step (Mem of string node | Nth of
int node baseline); formats add native addressing (Attribute,
Namespaced, Cbor_key, Field_number) via extension + register_step_printer.
Path.rev_indices -> Path.rev_steps; add Path.last, Path.to_list.
Error.t exposed as a record {ctx; meta; kind} so pattern matches
remain clean. Error.v/msg/raise take ~ctx ~meta labelled args.
JSON consumer: Json.Error.Context dropped; Json.Context aliases
Loc.Context. Query step fallback projects unknown steps to Mem via
Path.pp_step so foreign paths degrade to no-op queries instead of
failing.
Skill: Foo.Stream.fold/iter take (Loc.Context.t -> ...) callback
(one primitive, no _mem/_nth variants); transform takes f:(Context.t
-> [Copy|Edit|Drop]). Layer 3 documents extensible Path.step with
per-format native step examples.
Warning 69 (unused-field, mutable-never-assigned). Four independent
record fields were flagged as mutable but the code only mutates their
referents in place, never rebinds the record slot itself:
- ocaml-wal/lib/wal.ml: [t.file] (the Eio file resource; methods call
Eio.File.pwrite_all etc., the slot is set once at open time).
- ocaml-block/lib/block.ml: [Memory.state.data] (the backing bytes,
written via Bytes.blit_string; [Bytes.t] is already mutable).
- ocaml-sse/lib/sse.ml: [Parser.t.data_buf] (a Buffer.t, written via
Buffer.add_*; the slot never changes).
- ocaml-zephyr/lib/zephyr.ml: drop [mode : Read | Write] entirely —
set at open-time, read nowhere. The open_read / open_write
constructors already distinguish the two call shapes, so mode
tracking was redundant.
Loc.make and Loc.set_first/set_last previously took a (line_num,
byte_pos) tuple. Replace with four explicit labelled args
(first_line_num, first_line_byte, last_line_num, last_line_byte) so
call sites are self-documenting and harder to swap by mistake.
Likewise expose first_line_num / first_line_byte (etc.) accessors
instead of first_line / last_line returning the tuple.
Also rename Error.msgf to Error.failf to match the convention of
"raise" being implicit in the action verb (failf raises immediately;
msgf was historically a "wrap and raise" combinator that has the
same behaviour).
ocaml-csvt is the only in-repo consumer that still used the tuple
form; adapt csvt.ml to the new signature and the failf rename.
Rename the shared location/error-infrastructure package to 'loc' (module
Loc), dropping the awkward 'textloc' / 'Textloc' naming. Consumers now
write [Sexpt.Meta], [Sexpt.Error], [Loc.t], etc.
- ocaml-textloc -> ocaml-loc (directory, opam, module).
- Dropped the single-function Sort_kind module; parsers inline the
one-liner at their local Sort.kinded definitions.
- Parser dunes use [(re_export loc)] so downstream consumers don't need
to declare loc in their own dune or opam.
- monopam lint: new [collect_exports] walks META [exports] fields
(dune's re_export metadata) and expands each opam package's
effective dep set with everything its declared deps re-export.
[Fl_split.in_words] replaces the ad-hoc whitespace splitter.
- merlint: drop 'loc' from its dune-project depends -- reaches via
sexpt re_export.
- Consumers (cdm, s3, test files) updated to [Loc.*] naming.
All 360 tests pass (26 loc + 177 xmlt + 60 csvt + 77 sexpt + 20
dune-codec).