My aggregated monorepo of OCaml code, automaintained
0
fork

Configure Feed

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

Fix documentation gaps across day11

- layer.mld: add Layer module, update description for new core type
- batch.mld: add Profile and Snapshot modules
- doc.mld: add Doc_build module
- generate.mli: add doc comment for run function
- patches.mli: new interface file for Patches module

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+57 -9
+6 -1
day11/doc-pages/batch.mld
··· 12 12 layers and cascades recovery to dependents whose failing dependency has 13 13 since succeeded. {!Day11_batch.Summary} aggregates build and doc outcomes, records 14 14 per-package history, generates the status index, and prints a 15 - human-readable summary. 15 + human-readable summary. {!Day11_batch.Profile} manages named analysis 16 + configurations (repositories, targets, platform settings) stored as 17 + JSON files. {!Day11_batch.Snapshot} captures point-in-time state of all 18 + opam repositories within a profile, keyed by commit SHAs. 16 19 17 20 Sits near the top of the dependency hierarchy, depending on 18 21 {!day11-opam-build}, {!page-solution}, {!day11-lib}, {!day11-layer}, ··· 26 29 Day11_batch.Blessing 27 30 Day11_batch.Rerun 28 31 Day11_batch.Summary 32 + Day11_batch.Profile 33 + Day11_batch.Snapshot 29 34 }
+5
day11/doc-pages/doc.mld
··· 18 18 {!Day11_doc.Universe} tracks universe directories for documentation GC. 19 19 {!Day11_doc.Doc_meta} is the sidecar metadata for doc layers ([doc.json]), 20 20 recording the package name, phase, and dependencies. 21 + {!Day11_doc.Doc_build} provides stateless per-package doc build 22 + primitives (compile, link, doc-all) that take explicit inputs and 23 + produce results — the building blocks for both the DAG executor and 24 + external pipeline systems like OCurrent. 21 25 22 26 Sits near the top of the dependency hierarchy, depending on 23 27 {!page-opam_build}, {!page-opam_layer}, {!page-layer}, ··· 27 31 28 32 {!modules: 29 33 Day11_doc.Generate 34 + Day11_doc.Doc_build 30 35 Day11_doc.Doc_deps 31 36 Day11_doc.Doc_meta 32 37 Day11_doc.Phase
+14 -8
day11/doc-pages/layer.mld
··· 1 1 {0 day11-layer} 2 2 3 3 Generic layered storage on disk. A layer is a directory containing a 4 - [fs/] tree (the filesystem delta) plus metadata files. {!Day11_layer.Meta} 5 - serializes per-layer metadata ([layer.json]) covering exit status, 6 - parent hashes, timing, and disk usage. {!Day11_layer.Dir} owns the 7 - [build-XXXXXXXXXXXX] naming convention. {!Day11_layer.Base} represents the 4 + [fs/] tree (the filesystem delta) plus metadata files. 5 + 6 + The core type {!Day11_layer.Layer} represents a layer on disk via its 7 + content hash and directory path, with helpers to check existence and 8 + status. {!Day11_layer.Meta} serializes per-layer metadata ([layer.json]) 9 + covering exit status, parent hashes, timing, and disk usage. 10 + {!Day11_layer.Dir} owns the naming convention that derives directory 11 + names from content hashes. {!Day11_layer.Base} represents the 8 12 foundational rootfs image at the bottom of every overlay stack. 9 13 {!Day11_layer.Hash} computes content-addressed cache keys from layer inputs. 10 14 {!Day11_layer.Stack} merges multiple layers into one directory via hardlinked 11 15 copies, and plans overlayfs lowerdir layouts that fit kernel page-size 12 - limits. {!Day11_layer.Scan} enumerates layers from the on-disk cache. {!Day11_layer.Import} 13 - extracts layer filesystems from Docker images. {!Day11_layer.Last_used} maintains 14 - a cheap mtime-based sentinel for LRU eviction. {!Day11_layer.Symlinks} maintains 15 - per-identifier tracking symlinks for layer discovery. 16 + limits. {!Day11_layer.Scan} enumerates layers from the on-disk cache. 17 + {!Day11_layer.Import} extracts layer filesystems from Docker images. 18 + {!Day11_layer.Last_used} maintains a cheap mtime-based sentinel for LRU 19 + eviction. {!Day11_layer.Symlinks} maintains per-identifier tracking 20 + symlinks for layer discovery. 16 21 17 22 Depends on {!day11-exec} for subprocess and sudo access. Has no opam 18 23 or package-domain knowledge — domain-specific metadata lives in ··· 21 26 {1 Modules} 22 27 23 28 {!modules: 29 + Day11_layer.Layer 24 30 Day11_layer.Meta 25 31 Day11_layer.Dir 26 32 Day11_layer.Base
+3
day11/doc/generate.mli
··· 45 45 solutions:(OpamPackage.t * Day11_solution.Solve_result.t) list -> 46 46 blessing_maps:(OpamPackage.t * bool OpamPackage.Map.t) list -> 47 47 int * int 48 + (** Run the unified build+doc DAG with pre-resolved tools. 49 + Returns [(doc_count, html_file_count)]. Uses {!Day11_opam_build.Dag_executor} 50 + for parallel execution with priority ordering (link > compile > tool > build). *) 48 51 49 52 (** {1 Planned doc DAG} 50 53
+29
day11/opam_build/patches.mli
··· 1 + (** Package patches: load, hash, and apply via opam-build --patch. 2 + 3 + Patches are stored in a directory tree keyed by package name 4 + and version. When present, they are bind-mounted into the build 5 + container and passed to opam-build as [--patch] arguments. *) 6 + 7 + type t 8 + 9 + val create : Fpath.t -> t 10 + (** [create dir] creates a patch set rooted at [dir]. Patches for 11 + package [name.version] are expected at [dir/name/version/*.patch]. *) 12 + 13 + val has_patches : t -> OpamPackage.t -> bool 14 + (** [has_patches t pkg] returns true if any patches exist for [pkg]. *) 15 + 16 + val patches_for : t -> OpamPackage.t -> string list 17 + (** [patches_for t pkg] returns the list of patch file paths for [pkg]. *) 18 + 19 + val hash_for : t -> OpamPackage.t -> string 20 + (** [hash_for t pkg] returns a content hash of all patches for [pkg], 21 + used to include patches in layer hash computation. *) 22 + 23 + val patch_args : t -> OpamPackage.t -> string 24 + (** [patch_args t pkg] returns the [--patch] arguments for 25 + opam-build's command line as a single string. *) 26 + 27 + val patch_filenames : t -> OpamPackage.t -> string list 28 + (** [patch_filenames t pkg] returns just the patch filenames 29 + (without directory path). *)