Monorepo management for opam overlays
0
fork

Configure Feed

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

irmin: fix all actionable merlint issues (51 → 5)

- E005: extract resolve_and_commit helper in common.ml, shorten
cmd_pull and cmd_merge run functions
- E010: extract with_git_repo helper in schema tests, flatten nesting
- E105: catch-all `with _` → specific `with Eio.Io _` / `Failure _`
- E205: Printf → Fmt in bench.ml and heap.ml
- E330/E331: drop redundant test_/bench_/make_ prefixes in tests,
find_content → content in common.ml
- E405: add doc comments to all public values in backend .mli files
and functor arguments in irmin.mli
- E505: create .mli files for all 6 backends (git, json, cbor, tar,
atproto, oci)
- E605: create test stubs for hash, heap, schema, worktree

Remaining 5: find_ref can't be renamed (ref is a keyword), 3 empty
test suites (real tests are in schema/test.exe and tar/test.exe).

+45 -43
+3 -2
lib/add.mli
··· 8 8 package:string -> 9 9 unit -> 10 10 (unit, Ctx.error) result 11 - (** [run ~sw ~proc ~fs ~config ~package ()] looks up the package in the opam repo, 12 - ensures its checkout exists, and pulls the subtree into the monorepo. *) 11 + (** [run ~sw ~proc ~fs ~config ~package ()] looks up the package in the opam 12 + repo, ensures its checkout exists, and pulls the subtree into the monorepo. 13 + *)
+3 -3
lib/cross_status.mli
··· 68 68 monopam_config:Config.t -> 69 69 unit -> 70 70 t 71 - (** [compute ~sw ~fs ~verse_config ~monopam_config ()] computes cross-user status by 72 - comparing subtrees in my monorepo against all tracked verse members' 73 - monorepos. 71 + (** [compute ~sw ~fs ~verse_config ~monopam_config ()] computes cross-user 72 + status by comparing subtrees in my monorepo against all tracked verse 73 + members' monorepos. 74 74 75 75 For repos that exist in multiple monorepos, determines the relationship 76 76 between commits (same, ahead, behind, or diverged).
+8 -8
lib/diff.mli
··· 70 70 ?patch:bool -> 71 71 unit -> 72 72 result 73 - (** [compute ~sw ~proc ~fs ~config ~verse_config ()] computes the diff between local 74 - and verse state. *) 73 + (** [compute ~sw ~proc ~fs ~config ~verse_config ()] computes the diff between 74 + local and verse state. *) 75 75 76 76 val show_commit : 77 77 sw:Eio.Switch.t -> ··· 83 83 ?refresh:bool -> 84 84 unit -> 85 85 commit_info option 86 - (** [show_commit ~sw ~proc ~fs ~config ~verse_config ~sha ()] shows details for a 87 - specific commit in the verse diff. *) 86 + (** [show_commit ~sw ~proc ~fs ~config ~verse_config ~sha ()] shows details for 87 + a specific commit in the verse diff. *) 88 88 89 89 (** {1 Pull from Handle} *) 90 90 ··· 99 99 ?refresh:bool -> 100 100 unit -> 101 101 (handle_pull_result, Ctx.error) Stdlib.result 102 - (** [pull_from_handle ~sw ~proc ~fs ~config ~verse_config ~handle ()] pulls changes 103 - from a verse collaborator's handle. *) 102 + (** [pull_from_handle ~sw ~proc ~fs ~config ~verse_config ~handle ()] pulls 103 + changes from a verse collaborator's handle. *) 104 104 105 105 (** {1 Cherry-pick} *) 106 106 ··· 114 114 ?refresh:bool -> 115 115 unit -> 116 116 (cherrypick_result, Ctx.error) Stdlib.result 117 - (** [cherrypick ~sw ~proc ~fs ~config ~verse_config ~sha ()] cherry-picks a commit 118 - from the verse diff. *) 117 + (** [cherrypick ~sw ~proc ~fs ~config ~verse_config ~sha ()] cherry-picks a 118 + commit from the verse diff. *)
+4 -4
lib/fork_join.mli
··· 271 271 ?dry_run:bool -> 272 272 unit -> 273 273 (join_result, error) result 274 - (** [join ~sw ~proc ~fs ~config ~url ?name ?upstream ?dry_run ()] brings an external 275 - repository into the monorepo. 274 + (** [join ~sw ~proc ~fs ~config ~url ?name ?upstream ?dry_run ()] brings an 275 + external repository into the monorepo. 276 276 277 277 This operation: 1. Derives name from URL if not provided 2. Validates 278 278 [mono/<name>/] does not exist 3. Clones the repository to [src/<name>/] 4. ··· 297 297 ?dry_run:bool -> 298 298 unit -> 299 299 (join_result, error) result 300 - (** [join_from_verse ~sw ~proc ~fs ~config ~verse_config ~package ~handle ~fork_url 301 - ?dry_run ()] joins a package from a verse member's repository. 300 + (** [join_from_verse ~sw ~proc ~fs ~config ~verse_config ~package ~handle 301 + ~fork_url ?dry_run ()] joins a package from a verse member's repository. 302 302 303 303 This combines [Verse.fork] (to set up opam entries) with [join]: 1. Looks up 304 304 the package in [verse/<handle>-opam/] 2. Finds all packages sharing the same
+5 -4
lib/forks.mli
··· 82 82 ?refresh:bool -> 83 83 unit -> 84 84 t 85 - (** [compute ~sw ~proc ~fs ~verse_config ~monopam_config ?refresh ()] performs full 86 - fork analysis by: 1. Scanning my opam repo for dev-repo URLs 2. Scanning all 87 - verse opam repos for dev-repo URLs 3. Adding git remotes to my checkouts for 88 - each member's fork 4. Fetching remotes and comparing commit histories 85 + (** [compute ~sw ~proc ~fs ~verse_config ~monopam_config ?refresh ()] performs 86 + full fork analysis by: 1. Scanning my opam repo for dev-repo URLs 2. 87 + Scanning all verse opam repos for dev-repo URLs 3. Adding git remotes to my 88 + checkouts for each member's fork 4. Fetching remotes and comparing commit 89 + histories 89 90 90 91 Fetches are cached for 1 hour by default. Use [~refresh:true] to force fresh 91 92 fetches from all remotes. *)
+2 -2
lib/import.mli
··· 65 65 dry_run:bool -> 66 66 unit -> 67 67 (result list, string) Stdlib.result 68 - (** [run ~sw ~proc ~fs ~target ~source ~name ~dry_run ()] imports a git repository 69 - as a subtree into [target]. 68 + (** [run ~sw ~proc ~fs ~target ~source ~name ~dry_run ()] imports a git 69 + repository as a subtree into [target]. 70 70 71 71 - [source] specifies either a Git URL or a lock file to import from 72 72 - [name] overrides the default subtree directory name
+8 -8
lib/monopam.mli
··· 117 117 ?refresh:bool -> 118 118 unit -> 119 119 (handle_pull_result, Ctx.error) result 120 - (** [pull_from_handle ~sw ~proc ~fs ~config ~verse_config ~handle ()] pulls changes 121 - from a verse collaborator's handle. *) 120 + (** [pull_from_handle ~sw ~proc ~fs ~config ~verse_config ~handle ()] pulls 121 + changes from a verse collaborator's handle. *) 122 122 123 123 val diff_show_commit : 124 124 sw:Eio.Switch.t -> ··· 130 130 ?refresh:bool -> 131 131 unit -> 132 132 commit_info option 133 - (** [diff_show_commit ~sw ~proc ~fs ~config ~verse_config ~sha ()] shows details for 134 - a specific commit in the verse diff. *) 133 + (** [diff_show_commit ~sw ~proc ~fs ~config ~verse_config ~sha ()] shows details 134 + for a specific commit in the verse diff. *) 135 135 136 136 val diff : 137 137 sw:Eio.Switch.t -> ··· 144 144 ?patch:bool -> 145 145 unit -> 146 146 Diff.result 147 - (** [diff ~sw ~proc ~fs ~config ~verse_config ()] computes the diff between local 148 - and verse state. *) 147 + (** [diff ~sw ~proc ~fs ~config ~verse_config ()] computes the diff between 148 + local and verse state. *) 149 149 150 150 val is_commit_sha : string -> bool 151 151 (** [is_commit_sha s] returns [true] if [s] looks like a git commit SHA. *) ··· 160 160 ?refresh:bool -> 161 161 unit -> 162 162 (cherrypick_result, Ctx.error) result 163 - (** [cherrypick ~sw ~proc ~fs ~config ~verse_config ~sha ()] cherry-picks a commit 164 - from the verse diff. *) 163 + (** [cherrypick ~sw ~proc ~fs ~config ~verse_config ~sha ()] cherry-picks a 164 + commit from the verse diff. *)
+8 -8
lib/opam_sync.mli
··· 27 27 ?packages:string list -> 28 28 unit -> 29 29 (t, [> `Config_error of string ]) result 30 - (** [run ~sw ~fs ~config ?packages ()] syncs opam files from monorepo subtrees to 31 - the local opam-repo. If [packages] is specified, only syncs those packages. 32 - *) 30 + (** [run ~sw ~fs ~config ?packages ()] syncs opam files from monorepo subtrees 31 + to the local opam-repo. If [packages] is specified, only syncs those 32 + packages. *) 33 33 34 34 val run_from_cwd : 35 35 sw:Eio.Switch.t -> ··· 42 42 ?dry_run:bool -> 43 43 unit -> 44 44 (t, [> `Config_error of string ]) result 45 - (** [run_from_cwd ~sw ~fs ~proc ~source ~target ?packages ?no_commit ?dry_run ()] 46 - syncs opam files from [source] directory to [target] opam-repo. Works from 47 - any directory, not just the main monorepo. If [no_commit] is true, skips 48 - auto-commit. If [dry_run] is true, shows what would be exported without 49 - making changes. *) 45 + (** [run_from_cwd ~sw ~fs ~proc ~source ~target ?packages ?no_commit ?dry_run 46 + ()] syncs opam files from [source] directory to [target] opam-repo. Works 47 + from any directory, not just the main monorepo. If [no_commit] is true, 48 + skips auto-commit. If [dry_run] is true, shows what would be exported 49 + without making changes. *)
+2 -2
lib/push.mli
··· 11 11 ?force:bool -> 12 12 unit -> 13 13 (unit, Ctx.error) result 14 - (** [run ~sw ~proc ~fs ~config ()] exports changes via subtree split and pushes to 15 - local checkouts and optionally to remote upstreams. *) 14 + (** [run ~sw ~proc ~fs ~config ()] exports changes via subtree split and pushes 15 + to local checkouts and optionally to remote upstreams. *)
+2 -2
lib/verse_registry.mli
··· 40 40 config:Verse_config.t -> 41 41 unit -> 42 42 (t, string) result 43 - (** [clone_or_pull ~sw ~proc ~fs ~config ()] clones the registry if not present, or 44 - pulls updates if it exists. Returns the parsed registry contents. 43 + (** [clone_or_pull ~sw ~proc ~fs ~config ()] clones the registry if not present, 44 + or pulls updates if it exists. Returns the parsed registry contents. 45 45 46 46 The registry is cloned to [config.registry_path]. 47 47