commits
Remove libraries declared in '(libraries ...)' clauses but unreferenced
by any module in the same source tree, as flagged by 'monopam lint'
after the new Dead_lib detection landed. Touches 131 dune files across
~80 packages.
A few stanzas needed a positive correction instead of a pure removal:
- ocaml-git/bin/diag: depended on eio_main + bytesrw-eio for an
Eio_posix.run call site; the umbrella was overkill, switch to the
precise eio_posix package.
- ocaml-scaleway/lib, ocaml-s3/lib: scaleway.mli / s3.mli reference
Eio_unix.Stdenv.base; eio.unix is required and was missing.
- merlint/lib: pulled bytesrw + nox-opam.bytesrw to surface
Opam_bytesrw, used by rule e915 and lint helpers.
Stanzas where Dead_lib was a false positive (transitive dep needed
for module visibility, virtual-library impls) are left untouched —
e.g. helix.jx.jsoo for ocaml-globe/demo retains its (libraries ...)
entry because it provides the impl of the helix.jx virtual lib.
Pure formatting: dune fmt drops the leading 2-space indent.
Run mdx on lib/xdge.mli so the {[ ... ]} odoc block now type-checks.
The example used `env#fs` (object-method shorthand for an
imaginary env), which only works inside Eio_main.run. Wrapped in
`let run () =` and now uses `Eio.Stdenv.fs env`, then prints the
resolved config dir via Fmt.pr so the value is consumed rather than
elided.
Also removed a redundant @see-with-section-heading combo that was
blocking the odoc parse: the {2 Related Libraries} heading sat inside
the @see block, which odoc rejects ("section heading not allowed in
@see"). The same URL was already linked from the introduction's
{{:...} ...} link, so the @see was duplicate.
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.
xdge gets an explicit (source (tangled anil.recoil.org/xdge)): the
upstream lives in Anil's namespace, the fork in this monorepo is
pushed to gazagnaire.org/xdge via sources.toml. The monopam lint now
matches the dune-project source against either side of the fork
configuration, so both halves agree.
Object combinators: [Object.mem] -> [Object.member], [Object.opt_mem]
-> [Object.opt_member], [Object.case_mem] -> [Object.case_member]. The
sibling submodules [Object.Mem] / [Object.Mems] become
[Object.Member] / [Object.Members]. RFC 8259 §4 calls these
"name/value pairs, referred to as the members", so mirror the spec
name rather than the shortened [mem].
[Object.finish] -> [Object.seal]. "Seal" reads as "close the map, no
more members added", which is what the operation does.
Value constructors/queries: [Value.mem] (function) -> [Value.member];
[Value.mem_find] -> [Value.member_key]; [Value.mem_names] ->
[Value.member_names]; [Value.mem_keys] -> [Value.member_keys].
[type mem = ...] -> [type member = ...]; [type object'] still points
at [member list].
Downstream (~80 files across slack, sbom, stripe, sigstore, requests,
claude, irmin, freebox) updated via perl-pie. dune build clean,
dune test ocaml-json clean.
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.
Previously the eight git-x subcommands sat flat at top level (split,
check, fix, verify, filter-paths, split-commit, drop-commit, reword),
with 'split' ambiguous between the subtree split and the per-directory
commit split.
Regrouped into two namespaces that mirror the object they act on:
git-x tree
split (was: git-x split)
add (new — inject a standalone history under a prefix)
drop (was: git-x filter-paths)
check (was: git-x check)
fix (was: git-x fix)
verify (was: git-x verify)
git-x commit
split (was: git-x split-commit)
drop (was: git-x drop-commit)
reword (was: git-x reword)
Each subcommand lives in cmd_<group>_<verb>.{ml,mli}; cmd_tree.ml and
cmd_commit.ml are the Cmd.group wrappers. git_x.ml registers just the
two groups.
'tree add' is a thin wrapper over Git.Subtree.add, which already
existed in the library but had no CLI exposure. It accepts a ref (e.g.
FETCH_HEAD after 'git fetch URL REF') and a --prefix, then builds a
subtree-merge commit with the current user's git config identity.
Log source names are updated to match (git-x.tree.split,
git-x.tree.fix). The cram test under test/cram/tree_split.t is
updated to use the new 'git-x tree split' invocation throughout.
Bump the [dune] dep lower bound to 3.21 (already in the dune-project
files; the opam files were stale) and add the x-maintenance-intent
field.
Structural move per the new E521 rule and cram skill:
- Each package's cram tests now live under test/cram/, with shared
shell setup at test/cram/helpers.sh (auto-sourced by dune 3.21's
setup_scripts) and driver exes in test/cram/helpers/.
- Packages migrated: ocaml-git, ocaml-tty, ocaml-vlog, xdge,
ocaml-precommit, ocaml-publicsuffix, ocaml-requests, monopam, irmin.
- ocaml-tty's cram was actively broken; fixed and the driver rewritten
to use Tty.Progress.render.
- irmin: adds scrub_hash/scrub_time helper scripts for normalising
non-deterministic output (dune cram has no glob/regex matching).
Split encode_ccsds_block into best_split_k/encode_second_extension/
encode_uncompressed/encode_split. Pull decode_zero_blocks/decode_second
_extension/decode_uncompressed/decode_split out of decode_ccsds_blocks.
Compress now delegates each block to encode_one_block and a
count_zero_run helper; decompress factors out decode_rsi /
decompress_blocks. Move Alcotest.run from test_rice.ml into a new
test.ml exporting the rice suite. Add fuzz_rice.mli interface.
test_paths.ml redefined test_v and test_config_file_missing — both
already covered by test_xdge.ml's test_v and test_config_file_not_found
with the same assertions. Removing the file (and its dune entry, the
test.ml suite reference) since the coverage is preserved by test_xdge.
Generate .opam.template files with x-quality-* fields based on
detected package features:
- x-quality-build: has lib/ with .ml files
- x-quality-test: has test/ with .ml files
- x-quality-fuzz: has fuzz/ with .ml files
- x-quality-interop: has test/interop/ directory
- x-quality-cram: has test/*.t/ directories
These fields are picked up by dune's opam generation and will be
checked by merlint E910 for consistency.
Also: add fmt dep to ocaml-sse/lib/dune (Fmt.pf used without dep).
monopam quality — scans packages for quality features, caches by
git commit hash. 166 packages: build=163, test=162, fuzz=94,
interop=39, doc=42.
Standard vocabulary based on crates.io categories, erratique/opam
conventions, and monorepo domain coverage:
Org: org:blacksun
Domain: aerospace, codec, crypto, network, storage, git, merkle
Purpose: cli, test, bench, format, log, system
Protocol: ccsds, uslp, cop1, sdls, sle, atproto, tls, http, json, binary
Cross-cutting: eio, simulation, math, compression
Tags placed in dune-project (package ...) stanzas via (tags ...).
Propagated to .opam files by dune's opam generation.
- Update .ocamlformat to 0.29.0 across all 591 files
- csvt: reuse single Buffer.t for field reads (no alloc per field)
- sexpt: Obj members decoded from stream into Dict, typed Variant GADT
- Reformat all source files for 0.29.0
E605 fixes (25 new test files):
- monopam: test_lint (Lint module types, issue construction)
- irmin: test_irmin (Hash roundtrips, commit types, Tree API)
- ocaml-tls: test_core, test_state, test_x509_eio
- ocaml-x509 (19 files with RFC test vectors): pem, distinguished_name,
host, algorithm, certificate, validation, extension, general_name,
key_type, public_key, private_key, signing_request, crl,
authenticator, asn_grammars, ocsp, p12, rc2, registry
E617 fixes (2 naming): module_alias_parsing, warning_parse
memtrace/bin: fix unused warnings (remove unused type timestamp,
unused val length, prefix unused field _added_before, prefix unused
val _avg_dist_to_alloc) instead of suppressing with -w flags.
xdge/test: consolidate into single test runner, remove .mli files
that triggered dune @check bug (Alcotest unbound in bytecode check),
merge test_paths suite into main test executable.
- Extract pp_source/pp_path_with_source/pp_path_opt_with_source/pp_paths
to top-level to fix E005 on pp (76→34 lines)
- Extract resolve_dir_from_config/resolve_env_var/print_path/print_paths
to Cmd module level to fix E010 deep nesting in term (depth 5→3)
- Rename create→v, find_config_file→config_file, find_data_file→data_file,
find_file_in_dirs→file_in_dirs (E331/E332)
- Fix E410: add missing periods to all doc strings in xdge.mli
- Fix E105: replace catch-all with Eio.Io in test_xdge.ml
- Add test_xdge.ml/mli, test.ml, update dune for E605
- Add suite to test_paths for E600/E621
Migrate Printf.sprintf to Fmt.str, Format.fprintf to Fmt.pf, and
Format.pp_print_string to Fmt.string across bundle, gpt, hap, homebrew,
jsonwt, matter, mbr, meross, paseto, precommit, publicsuffix, qemu,
retry, sdnv, slack, sle, space-packet, spake2, sqlite, squashfs, tar,
tc, tcf, tcpcl, tm, tomlt, tty, uslp, vlog, wal, wire, yamlrw, yamlt,
osrelease, space, xdge, and crypto test runner.
Rename the d3t library to wire for clarity. Update all references
in bench, test, and library code across affected packages.
- License -> Licence
- color -> colour (in prose, not API/code)
- behavior -> behaviour
- analyze -> analyse
- organized -> organised
- Remove marketing buzzwords (leveraging)
- Remove emojis from prose
Remove libraries declared in '(libraries ...)' clauses but unreferenced
by any module in the same source tree, as flagged by 'monopam lint'
after the new Dead_lib detection landed. Touches 131 dune files across
~80 packages.
A few stanzas needed a positive correction instead of a pure removal:
- ocaml-git/bin/diag: depended on eio_main + bytesrw-eio for an
Eio_posix.run call site; the umbrella was overkill, switch to the
precise eio_posix package.
- ocaml-scaleway/lib, ocaml-s3/lib: scaleway.mli / s3.mli reference
Eio_unix.Stdenv.base; eio.unix is required and was missing.
- merlint/lib: pulled bytesrw + nox-opam.bytesrw to surface
Opam_bytesrw, used by rule e915 and lint helpers.
Stanzas where Dead_lib was a false positive (transitive dep needed
for module visibility, virtual-library impls) are left untouched —
e.g. helix.jx.jsoo for ocaml-globe/demo retains its (libraries ...)
entry because it provides the impl of the helix.jx virtual lib.
Run mdx on lib/xdge.mli so the {[ ... ]} odoc block now type-checks.
The example used `env#fs` (object-method shorthand for an
imaginary env), which only works inside Eio_main.run. Wrapped in
`let run () =` and now uses `Eio.Stdenv.fs env`, then prints the
resolved config dir via Fmt.pr so the value is consumed rather than
elided.
Also removed a redundant @see-with-section-heading combo that was
blocking the odoc parse: the {2 Related Libraries} heading sat inside
the @see block, which odoc rejects ("section heading not allowed in
@see"). The same URL was already linked from the introduction's
{{:...} ...} link, so the @see was duplicate.
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.
Object combinators: [Object.mem] -> [Object.member], [Object.opt_mem]
-> [Object.opt_member], [Object.case_mem] -> [Object.case_member]. The
sibling submodules [Object.Mem] / [Object.Mems] become
[Object.Member] / [Object.Members]. RFC 8259 §4 calls these
"name/value pairs, referred to as the members", so mirror the spec
name rather than the shortened [mem].
[Object.finish] -> [Object.seal]. "Seal" reads as "close the map, no
more members added", which is what the operation does.
Value constructors/queries: [Value.mem] (function) -> [Value.member];
[Value.mem_find] -> [Value.member_key]; [Value.mem_names] ->
[Value.member_names]; [Value.mem_keys] -> [Value.member_keys].
[type mem = ...] -> [type member = ...]; [type object'] still points
at [member list].
Downstream (~80 files across slack, sbom, stripe, sigstore, requests,
claude, irmin, freebox) updated via perl-pie. dune build clean,
dune test ocaml-json clean.
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.
Previously the eight git-x subcommands sat flat at top level (split,
check, fix, verify, filter-paths, split-commit, drop-commit, reword),
with 'split' ambiguous between the subtree split and the per-directory
commit split.
Regrouped into two namespaces that mirror the object they act on:
git-x tree
split (was: git-x split)
add (new — inject a standalone history under a prefix)
drop (was: git-x filter-paths)
check (was: git-x check)
fix (was: git-x fix)
verify (was: git-x verify)
git-x commit
split (was: git-x split-commit)
drop (was: git-x drop-commit)
reword (was: git-x reword)
Each subcommand lives in cmd_<group>_<verb>.{ml,mli}; cmd_tree.ml and
cmd_commit.ml are the Cmd.group wrappers. git_x.ml registers just the
two groups.
'tree add' is a thin wrapper over Git.Subtree.add, which already
existed in the library but had no CLI exposure. It accepts a ref (e.g.
FETCH_HEAD after 'git fetch URL REF') and a --prefix, then builds a
subtree-merge commit with the current user's git config identity.
Log source names are updated to match (git-x.tree.split,
git-x.tree.fix). The cram test under test/cram/tree_split.t is
updated to use the new 'git-x tree split' invocation throughout.
Structural move per the new E521 rule and cram skill:
- Each package's cram tests now live under test/cram/, with shared
shell setup at test/cram/helpers.sh (auto-sourced by dune 3.21's
setup_scripts) and driver exes in test/cram/helpers/.
- Packages migrated: ocaml-git, ocaml-tty, ocaml-vlog, xdge,
ocaml-precommit, ocaml-publicsuffix, ocaml-requests, monopam, irmin.
- ocaml-tty's cram was actively broken; fixed and the driver rewritten
to use Tty.Progress.render.
- irmin: adds scrub_hash/scrub_time helper scripts for normalising
non-deterministic output (dune cram has no glob/regex matching).
Split encode_ccsds_block into best_split_k/encode_second_extension/
encode_uncompressed/encode_split. Pull decode_zero_blocks/decode_second
_extension/decode_uncompressed/decode_split out of decode_ccsds_blocks.
Compress now delegates each block to encode_one_block and a
count_zero_run helper; decompress factors out decode_rsi /
decompress_blocks. Move Alcotest.run from test_rice.ml into a new
test.ml exporting the rice suite. Add fuzz_rice.mli interface.
Generate .opam.template files with x-quality-* fields based on
detected package features:
- x-quality-build: has lib/ with .ml files
- x-quality-test: has test/ with .ml files
- x-quality-fuzz: has fuzz/ with .ml files
- x-quality-interop: has test/interop/ directory
- x-quality-cram: has test/*.t/ directories
These fields are picked up by dune's opam generation and will be
checked by merlint E910 for consistency.
Also: add fmt dep to ocaml-sse/lib/dune (Fmt.pf used without dep).
Standard vocabulary based on crates.io categories, erratique/opam
conventions, and monorepo domain coverage:
Org: org:blacksun
Domain: aerospace, codec, crypto, network, storage, git, merkle
Purpose: cli, test, bench, format, log, system
Protocol: ccsds, uslp, cop1, sdls, sle, atproto, tls, http, json, binary
Cross-cutting: eio, simulation, math, compression
Tags placed in dune-project (package ...) stanzas via (tags ...).
Propagated to .opam files by dune's opam generation.
E605 fixes (25 new test files):
- monopam: test_lint (Lint module types, issue construction)
- irmin: test_irmin (Hash roundtrips, commit types, Tree API)
- ocaml-tls: test_core, test_state, test_x509_eio
- ocaml-x509 (19 files with RFC test vectors): pem, distinguished_name,
host, algorithm, certificate, validation, extension, general_name,
key_type, public_key, private_key, signing_request, crl,
authenticator, asn_grammars, ocsp, p12, rc2, registry
E617 fixes (2 naming): module_alias_parsing, warning_parse
memtrace/bin: fix unused warnings (remove unused type timestamp,
unused val length, prefix unused field _added_before, prefix unused
val _avg_dist_to_alloc) instead of suppressing with -w flags.
xdge/test: consolidate into single test runner, remove .mli files
that triggered dune @check bug (Alcotest unbound in bytecode check),
merge test_paths suite into main test executable.
- Extract pp_source/pp_path_with_source/pp_path_opt_with_source/pp_paths
to top-level to fix E005 on pp (76→34 lines)
- Extract resolve_dir_from_config/resolve_env_var/print_path/print_paths
to Cmd module level to fix E010 deep nesting in term (depth 5→3)
- Rename create→v, find_config_file→config_file, find_data_file→data_file,
find_file_in_dirs→file_in_dirs (E331/E332)
- Fix E410: add missing periods to all doc strings in xdge.mli
- Fix E105: replace catch-all with Eio.Io in test_xdge.ml
- Add test_xdge.ml/mli, test.ml, update dune for E605
- Add suite to test_paths for E600/E621
Migrate Printf.sprintf to Fmt.str, Format.fprintf to Fmt.pf, and
Format.pp_print_string to Fmt.string across bundle, gpt, hap, homebrew,
jsonwt, matter, mbr, meross, paseto, precommit, publicsuffix, qemu,
retry, sdnv, slack, sle, space-packet, spake2, sqlite, squashfs, tar,
tc, tcf, tcpcl, tm, tomlt, tty, uslp, vlog, wal, wire, yamlrw, yamlt,
osrelease, space, xdge, and crypto test runner.