alpha
Login
or
Join now
gazagnaire.org
/
ocaml-builder
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
OCI-oriented build engine
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
ocaml-builder
/
test
/
opam_cache
10 files
at
main
Thomas Gazagnaire
dune: remove stale dependency entries
4w ago
1ce4a90d
dune
dune: remove stale dependency entries
1 month ago
test.ml
builder: expose the day10 opam cache as a content-addressable source The unified build queries one CAS at any grain; the day10/d10 binary-layer cache (Cache) is one such sub-store, but it is input-keyed -- by an opam deployment hash -- and materialises fs trees, so it does not fit a writable, content-keyed Cas.S. Split the read facet out and adapt the cache to it: - Cas gains a Source module type (mem + find); S is now Source plus put. The option-returning lookup is named find, matching E325 and the Irmin content-addressable idiom (was get). - Builder_opam.Oi exposes the cache as a Cas.Source: mem is the layer's presence; find tars its fs tree into a scratch in-memory OCI store (reproducible headers, symlinks preserved) and returns the bytes -- the tar/blob bridge that lets an fs-tree cache compose into the byte-oriented shared store. Read-only: day10 and the build populate it via Cache.store.
1 month ago
test_cache.ml
tree: finish dropping ocaml- prefixes and splitting CLI subcommands
1 month ago
test_cache.mli
builder: parse opam install commands with cmdliner before substituting The PKG-opam substitution now recovers its resolution request from the command rather than taking the whole run: Builder_opam.Command shell- tokenises the command, refuses anything with shell metacharacters, and parses the remainder with a cmdliner term mirroring opam's own CLI (a package positional list plus the resolution-affecting --with-test and --with-doc flags). An unrecognised flag or subcommand, a variable, or a pipeline yields None, so the step runs opam unchanged -- substitution is layered only on commands whose meaning is unambiguous. Runtime.wrap now takes solve over a parsed Command.request, the seam a real opam solver plugs into. The tests move under test/opam_cache as a standalone runner, one file per module, sharing fixtures through a new test/helpers library.
1 month ago
test_command.ml
builder: parse opam install commands with cmdliner before substituting The PKG-opam substitution now recovers its resolution request from the command rather than taking the whole run: Builder_opam.Command shell- tokenises the command, refuses anything with shell metacharacters, and parses the remainder with a cmdliner term mirroring opam's own CLI (a package positional list plus the resolution-affecting --with-test and --with-doc flags). An unrecognised flag or subcommand, a variable, or a pipeline yields None, so the step runs opam unchanged -- substitution is layered only on commands whose meaning is unambiguous. Runtime.wrap now takes solve over a parsed Command.request, the seam a real opam solver plugs into. The tests move under test/opam_cache as a standalone runner, one file per module, sharing fixtures through a new test/helpers library.
1 month ago
test_command.mli
builder: parse opam install commands with cmdliner before substituting The PKG-opam substitution now recovers its resolution request from the command rather than taking the whole run: Builder_opam.Command shell- tokenises the command, refuses anything with shell metacharacters, and parses the remainder with a cmdliner term mirroring opam's own CLI (a package positional list plus the resolution-affecting --with-test and --with-doc flags). An unrecognised flag or subcommand, a variable, or a pipeline yields None, so the step runs opam unchanged -- substitution is layered only on commands whose meaning is unambiguous. Runtime.wrap now takes solve over a parsed Command.request, the seam a real opam solver plugs into. The tests move under test/opam_cache as a standalone runner, one file per module, sharing fixtures through a new test/helpers library.
1 month ago
test_oi.ml
builder: expose the day10 opam cache as a content-addressable source The unified build queries one CAS at any grain; the day10/d10 binary-layer cache (Cache) is one such sub-store, but it is input-keyed -- by an opam deployment hash -- and materialises fs trees, so it does not fit a writable, content-keyed Cas.S. Split the read facet out and adapt the cache to it: - Cas gains a Source module type (mem + find); S is now Source plus put. The option-returning lookup is named find, matching E325 and the Irmin content-addressable idiom (was get). - Builder_opam.Oi exposes the cache as a Cas.Source: mem is the layer's presence; find tars its fs tree into a scratch in-memory OCI store (reproducible headers, symlinks preserved) and returns the bytes -- the tar/blob bridge that lets an fs-tree cache compose into the byte-oriented shared store. Read-only: day10 and the build populate it via Cache.store.
1 month ago
test_oi.mli
builder: expose the day10 opam cache as a content-addressable source The unified build queries one CAS at any grain; the day10/d10 binary-layer cache (Cache) is one such sub-store, but it is input-keyed -- by an opam deployment hash -- and materialises fs trees, so it does not fit a writable, content-keyed Cas.S. Split the read facet out and adapt the cache to it: - Cas gains a Source module type (mem + find); S is now Source plus put. The option-returning lookup is named find, matching E325 and the Irmin content-addressable idiom (was get). - Builder_opam.Oi exposes the cache as a Cas.Source: mem is the layer's presence; find tars its fs tree into a scratch in-memory OCI store (reproducible headers, symlinks preserved) and returns the bytes -- the tar/blob bridge that lets an fs-tree cache compose into the byte-oriented shared store. Read-only: day10 and the build populate it via Cache.store.
1 month ago
test_runtime.ml
builder: key opam PKG steps by deferred closure resolution A RUN opam install step is keyed on the dependency closure opam would install, but that closure depends on the opam repo inside the build rootfs -- which only exists once the prior layers materialise it. Keying on the command alone is unsound (two different repos give two different closures under one key) and keying on the closure was impossible without a rootfs. Resolve both by deferring the key to when the parent is materialised. Runtime.prepare_run gains an optional ~root (the materialised parent rootfs); the engine's exec_op passes the parent it has already built, so the opam decorator resolves the closure against the image's own repo -- the only sound source -- and keys the step on the identity of that closure's layers (opam-layers:<solve_hash>). Two images that install the same closure now share the step and its layers; the run closure restores the pre-resolved layers when cached and runs opam only on a miss. When the rootfs is absent or the command is not a recognised install, the step falls back to a command digest. The pre-build plan cannot key a PKG step until its parent is built: it marks the step (and the chain after it) Build_graph.Deferred when the parent is not cached, and materialises the cached parent to resolve the key otherwise.
1 month ago
test_runtime.mli
builder: parse opam install commands with cmdliner before substituting The PKG-opam substitution now recovers its resolution request from the command rather than taking the whole run: Builder_opam.Command shell- tokenises the command, refuses anything with shell metacharacters, and parses the remainder with a cmdliner term mirroring opam's own CLI (a package positional list plus the resolution-affecting --with-test and --with-doc flags). An unrecognised flag or subcommand, a variable, or a pipeline yields None, so the step runs opam unchanged -- substitution is layered only on commands whose meaning is unambiguous. Runtime.wrap now takes solve over a parsed Command.request, the seam a real opam solver plugs into. The tests move under test/opam_cache as a standalone runner, one file per module, sharing fixtures through a new test/helpers library.
1 month ago