Monorepo management for opam overlays
0
fork

Configure Feed

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

Simplify verse commands: sync all registry members with opam repos

Changes:
- verse pull now clones/pulls ALL registry members unconditionally
- Each member gets both monorepo (verse/<handle>/) and opam repo
(verse/<handle>-opam/)
- Removed verse add and verse remove commands (no longer needed)
- verse sync is now just an alias for verse pull

The verse directory now contains:
verse/alice.bsky.social/ # monorepo
verse/alice.bsky.social-opam/ # opam overlay

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

+111 -355
+37 -162
bin/main.ml
··· 401 401 let doc = "Tangled handle (e.g., alice.bsky.social)" in 402 402 Arg.(required & opt (some string) None & info [ "handle" ] ~docv:"HANDLE" ~doc) 403 403 404 - let verse_handle_pos_arg = 405 - let doc = "Tangled handle (e.g., alice.bsky.social)" in 406 - Arg.(required & pos 0 (some string) None & info [] ~docv:"HANDLE" ~doc) 407 - 408 404 let verse_handle_opt_pos_arg = 409 405 let doc = "Tangled handle. If not specified, operates on all tracked members." in 410 406 Arg.(value & pos 0 (some string) None & info [] ~docv:"HANDLE" ~doc) ··· 577 573 in 578 574 Cmd.v info Term.(ret (const run $ logging_term)) 579 575 580 - let verse_add_all_arg = 581 - let doc = "Add all members from the registry." in 582 - Arg.(value & flag & info [ "all" ] ~doc) 583 - let verse_add_cmd = 584 - let doc = "Add a member to the workspace" in 585 - let man = 586 - [ 587 - `S Manpage.s_description; 588 - `P 589 - "Adds a community member's monorepo to your workspace by cloning it \ 590 - to the verse/<handle>/ directory."; 591 - `P 592 - "With --all, adds all members from the registry that are not already \ 593 - tracked in your workspace."; 594 - `S "PROCESS"; 595 - `P "The add command performs the following steps:"; 596 - `I ("1.", "Validates the handle against the tangled network (AT Protocol)"); 597 - `I ("2.", "Looks up the handle in the opamverse registry"); 598 - `I ("3.", "Clones their monorepo to verse/<handle>/"); 599 - `S "HANDLE VALIDATION"; 600 - `P 601 - "Handles are validated against the AT Protocol identity system to \ 602 - ensure they exist. This requires prior authentication:"; 603 - `Pre "tangled auth login"; 604 - `S "AFTER ADDING"; 605 - `P 606 - "Once added, you can browse the member's code in verse/<handle>/. \ 607 - Their monorepo follows the same structure as yours (managed by monopam), \ 608 - so you can explore their packages and dependencies."; 609 - `P "Use 'monopam verse pull <handle>' to fetch updates later."; 610 - `S Manpage.s_examples; 611 - `Pre "# Add a member\n\ 612 - monopam verse add alice.bsky.social\n\n\ 613 - # Add all members from the registry\n\ 614 - monopam verse add --all\n\n\ 615 - # Browse their code\n\ 616 - ls verse/alice.bsky.social/\n\ 617 - cd verse/alice.bsky.social && dune build"; 618 - `S "ERRORS"; 619 - `I ("Member not found", "The handle is not in the registry - they need to register first"); 620 - `I ("Handle not found", "The handle doesn't exist on the tangled network"); 621 - `I ("Not authenticated", "Run 'tangled auth login' first"); 622 - ] 623 - in 624 - let info = Cmd.info "add" ~doc ~man in 625 - let run handle all () = 626 - Eio_main.run @@ fun env -> 627 - Eio.Switch.run @@ fun sw -> 628 - with_verse_config env @@ fun config -> 629 - let fs = Eio.Stdenv.fs env in 630 - let proc = Eio.Stdenv.process_mgr env in 631 - match (handle, all) with 632 - | None, false -> 633 - Fmt.epr "Error: Either provide a HANDLE or use --all@."; 634 - `Error (true, "missing argument") 635 - | Some _, true -> 636 - Fmt.epr "Error: Cannot use --all with a specific handle@."; 637 - `Error (true, "conflicting arguments") 638 - | Some handle, false -> 639 - (match Monopam.Verse.add ~proc ~fs ~sw ~env ~config ~handle () with 640 - | Ok () -> 641 - Fmt.pr "Added %s to workspace.@." handle; 642 - `Ok () 643 - | Error e -> 644 - Fmt.epr "Error: %a@." Monopam.Verse.pp_error e; 645 - `Error (false, "add failed")) 646 - | None, true -> 647 - (match Monopam.Verse.add_all ~proc ~fs ~sw ~env ~config () with 648 - | Ok members -> 649 - Fmt.pr "Added %d members to workspace.@." (List.length members); 650 - `Ok () 651 - | Error e -> 652 - Fmt.epr "Error: %a@." Monopam.Verse.pp_error e; 653 - `Error (false, "add --all failed")) 654 - in 655 - Cmd.v info Term.(ret (const run $ verse_handle_opt_pos_arg $ verse_add_all_arg $ logging_term)) 656 - 657 - let verse_remove_cmd = 658 - let doc = "Remove a member from the workspace" in 659 - let man = 660 - [ 661 - `S Manpage.s_description; 662 - `P 663 - "Removes a member's monorepo from your workspace by deleting the \ 664 - verse/<handle>/ directory."; 665 - `P 666 - "This is a local operation - it only affects your workspace. The \ 667 - member remains in the registry and can be re-added later."; 668 - `S "WARNING"; 669 - `P 670 - "This permanently deletes the local clone. Any local changes you \ 671 - made in verse/<handle>/ will be lost. If you have uncommitted work, \ 672 - commit and push it first (if you have write access) or back it up."; 673 - `S Manpage.s_examples; 674 - `Pre "# Remove a member\n\ 675 - monopam verse remove alice.bsky.social\n\n\ 676 - # Re-add them later if needed\n\ 677 - monopam verse add alice.bsky.social"; 678 - ] 679 - in 680 - let info = Cmd.info "remove" ~doc ~man in 681 - let run handle () = 682 - Eio_main.run @@ fun env -> 683 - with_verse_config env @@ fun config -> 684 - let fs = Eio.Stdenv.fs env in 685 - match Monopam.Verse.remove ~fs ~config ~handle () with 686 - | Ok () -> 687 - Fmt.pr "Removed %s from workspace.@." handle; 688 - `Ok () 689 - | Error e -> 690 - Fmt.epr "Error: %a@." Monopam.Verse.pp_error e; 691 - `Error (false, "remove failed") 692 - in 693 - Cmd.v info Term.(ret (const run $ verse_handle_pos_arg $ logging_term)) 694 - 695 576 let verse_pull_cmd = 696 - let doc = "Pull updates for tracked members" in 577 + let doc = "Sync all registry members to local workspace" in 697 578 let man = 698 579 [ 699 580 `S Manpage.s_description; 700 581 `P 701 - "Fetches and merges git updates for tracked members' monorepos. \ 702 - This runs 'git pull' in each member's directory under verse/."; 582 + "Clones or pulls all members from the opamverse registry. For each \ 583 + member, syncs both their monorepo and opam overlay repository."; 584 + `S "WHAT IT DOES"; 585 + `P "For each member in the registry:"; 586 + `I ("1.", "Clones or pulls their monorepo to verse/<handle>/"); 587 + `I ("2.", "Clones or pulls their opam repo to verse/<handle>-opam/"); 703 588 `S "SCOPE"; 704 - `P "With a handle argument: pulls only that specific member."; 705 - `P "Without arguments: pulls all tracked members in verse/."; 706 - `S "TRACKED MEMBERS"; 707 - `P 708 - "A member is 'tracked' if their directory exists under verse/. \ 709 - This happens after running 'monopam verse add <handle>'."; 589 + `P "With a handle argument: syncs only that specific member."; 590 + `P "Without arguments: syncs all members in the registry."; 710 591 `S "ERROR HANDLING"; 711 592 `P 712 - "If a pull fails for one member (e.g., merge conflict), the error \ 713 - is reported but other members are still pulled."; 714 - `P 715 - "Resolve conflicts manually in verse/<handle>/ and commit, or use \ 716 - 'git reset --hard origin/main' to discard local changes."; 593 + "If a sync fails for one member (e.g., network error), the error \ 594 + is reported but other members are still synced."; 717 595 `S Manpage.s_examples; 718 - `Pre "# Pull all tracked members\n\ 596 + `Pre "# Sync all registry members\n\ 719 597 monopam verse pull\n\n\ 720 - # Pull a specific member\n\ 721 - monopam verse pull alice.bsky.social"; 598 + # Sync a specific member\n\ 599 + monopam verse pull alice.bsky.social\n\n\ 600 + # Browse their code\n\ 601 + ls verse/alice.bsky.social/"; 722 602 ] 723 603 in 724 604 let info = Cmd.info "pull" ~doc ~man in ··· 729 609 let proc = Eio.Stdenv.process_mgr env in 730 610 match Monopam.Verse.pull ~proc ~fs ~config ?handle () with 731 611 | Ok () -> 732 - Fmt.pr "Pull completed.@."; 612 + Fmt.pr "Sync completed.@."; 733 613 `Ok () 734 614 | Error e -> 735 615 Fmt.epr "Error: %a@." Monopam.Verse.pp_error e; ··· 801 681 # Step 2: Create and initialize your workspace\n\ 802 682 mkdir ~/tangled && cd ~/tangled\n\ 803 683 monopam verse init --handle yourname.bsky.social\n\n\ 804 - # Step 3: Browse available community members\n\ 805 - monopam verse members\n\n\ 806 - # Step 4: Add a member to track their monorepo\n\ 807 - monopam verse add alice.bsky.social\n\n\ 808 - # Step 5: Browse their code\n\ 809 - ls verse/alice.bsky.social/\n\ 684 + # Step 3: Sync all community members\n\ 685 + monopam verse pull\n\n\ 686 + # Step 4: Browse their code\n\ 687 + ls verse/\n\ 810 688 cd verse/alice.bsky.social && dune build\n\n\ 811 - # Step 6: Keep everything updated (run daily/weekly)\n\ 689 + # Step 5: Keep everything updated (run daily/weekly)\n\ 812 690 monopam verse sync"; 813 691 `S "KEY CONCEPTS"; 814 - `I ("Workspace", "A directory containing your monorepo plus tracked members' monorepos"); 815 - `I ("Registry", "A git repository listing community members and their monorepo URLs"); 692 + `I ("Workspace", "A directory containing your monorepo plus all registry members' repos"); 693 + `I ("Registry", "A git repository listing community members and their repo URLs"); 816 694 `I ("Handle", "A tangled identity like 'alice.bsky.social' validated via AT Protocol"); 817 - `I ("Tracking", "Cloning another member's monorepo to your verse/ directory"); 818 695 `S "WORKSPACE STRUCTURE"; 819 696 `P "An opamverse workspace has this layout:"; 820 - `Pre "~/tangled/ # workspace root\n\ 821 - ├── mono/ # YOUR monorepo (use monopam pull/push here)\n\ 822 - ├── src/ # YOUR fork checkouts\n\ 697 + `Pre "~/tangled/ # workspace root\n\ 698 + ├── mono/ # YOUR monorepo\n\ 699 + ├── src/ # YOUR fork checkouts\n\ 700 + ├── opam-repo/ # YOUR opam overlay\n\ 823 701 └── verse/\n\ 824 - \ ├── alice.bsky.social/ # Alice's monorepo (read-only tracking)\n\ 825 - \ └── bob.example.com/ # Bob's monorepo (read-only tracking)"; 702 + \ ├── alice.bsky.social/ # Alice's monorepo\n\ 703 + \ ├── alice.bsky.social-opam/ # Alice's opam overlay\n\ 704 + \ ├── bob.example.com/ # Bob's monorepo\n\ 705 + \ └── bob.example.com-opam/ # Bob's opam overlay"; 826 706 `P "Configuration and data are stored in XDG directories:"; 827 707 `Pre "~/.config/monopam/\n\ 828 708 └── opamverse.toml # workspace configuration\n\n\ ··· 833 713 `P "$(b,First-time setup) (once per machine):"; 834 714 `Pre "tangled auth login # authenticate\n\ 835 715 monopam verse init --handle you.bsky.social # create workspace"; 836 - `P "$(b,Adding members to track):"; 837 - `Pre "monopam verse members # list available members\n\ 838 - monopam verse add alice.bsky.social # clone their monorepo\n\ 839 - monopam verse status # verify it was added"; 716 + `P "$(b,Syncing all members):"; 717 + `Pre "monopam verse pull # clone/pull all members\n\ 718 + monopam verse status # check status"; 840 719 `P "$(b,Daily maintenance):"; 841 720 `Pre "monopam verse sync # update everything\n\ 842 721 monopam verse status # check for changes"; ··· 870 749 "Default registry: https://tangled.org/eeg.cl.cam.ac.uk/opamverse"; 871 750 `S "COMMANDS REFERENCE"; 872 751 `I ("init", "Create a new workspace with config and directories"); 873 - `I ("status", "Show tracked members and their git status"); 752 + `I ("status", "Show members and their git status"); 874 753 `I ("members", "List all members in the registry"); 875 - `I ("add <handle>", "Clone a member's monorepo to verse/"); 876 - `I ("remove <handle>", "Delete a member's local clone"); 877 - `I ("pull [<handle>]", "Git pull tracked member(s)"); 754 + `I ("pull [<handle>]", "Clone/pull all members (or specific member)"); 878 755 `I ("sync", "Update registry and pull all members"); 879 756 `S "AUTHENTICATION"; 880 757 `P ··· 890 767 verse_init_cmd; 891 768 verse_status_cmd; 892 769 verse_members_cmd; 893 - verse_add_cmd; 894 - verse_remove_cmd; 895 770 verse_pull_cmd; 896 771 verse_sync_cmd; 897 772 ]
+68 -146
lib/verse.ml
··· 95 95 let eio_path = Eio.Path.(fs / Fpath.to_string path) in 96 96 try Eio.Path.mkdirs ~perm:0o755 eio_path with Eio.Io _ -> () 97 97 98 - (* Helper to recursively delete a directory *) 99 - let rec rm_rf ~fs path = 100 - let eio_path = Eio.Path.(fs / Fpath.to_string path) in 101 - match Eio.Path.kind ~follow:false eio_path with 102 - | `Directory -> 103 - (* List and delete contents first *) 104 - let entries = Eio.Path.read_dir eio_path in 105 - List.iter (fun name -> rm_rf ~fs Fpath.(path / name)) entries; 106 - Eio.Path.rmdir eio_path 107 - | `Regular_file | `Symbolic_link | `Block_device | `Character_special 108 - | `Fifo | `Socket | `Unknown -> 109 - Eio.Path.unlink eio_path 110 - | `Not_found -> () 111 - | exception _ -> () 112 - 113 98 (* Get list of tracked members by looking at verse/ directory *) 114 99 let get_tracked_handles ~fs config = 115 100 let verse_path = Verse_config.verse_path config in ··· 265 250 | Error msg -> Error (Registry_error msg) 266 251 | Ok registry -> Ok registry.members 267 252 268 - let add ~proc ~fs ~sw ~env ~config ~handle () = 269 - Logs.info (fun m -> m "Adding member: %s" handle); 270 - (* Validate handle *) 271 - match validate_handle ~sw ~env handle with 272 - | Error e -> Error e 273 - | Ok () -> ( 274 - (* Load registry *) 275 - match Verse_registry.clone_or_pull ~proc ~fs ~config () with 276 - | Error msg -> Error (Registry_error msg) 277 - | Ok registry -> ( 278 - (* Find member *) 279 - match Verse_registry.find_member registry ~handle with 280 - | None -> Error (Member_not_found handle) 281 - | Some member -> 282 - (* Ensure verse directory exists *) 283 - let verse_dir = Verse_config.verse_path config in 284 - Logs.info (fun m -> m "Verse directory: %a" Fpath.pp verse_dir); 285 - ensure_dir ~fs verse_dir; 286 - let local_path = Fpath.(verse_dir / handle) in 287 - Logs.info (fun m -> m "Clone target: %a" Fpath.pp local_path); 288 - (* Check if already cloned *) 289 - if Git.is_repo ~proc ~fs local_path then begin 290 - Logs.info (fun m -> m "Already cloned"); 291 - Ok () 292 - end 293 - else begin 294 - (* Clone the monorepo *) 295 - let url = Uri.of_string member.monorepo in 296 - Logs.info (fun m -> m "Cloning from %s" member.monorepo); 297 - match Git.clone ~proc ~fs ~url ~branch:Verse_config.default_branch local_path with 298 - | Error e -> Error (Git_error e) 299 - | Ok () -> 300 - Logs.info (fun m -> m "Clone succeeded"); 301 - Ok () 302 - end)) 303 253 304 - let remove ~fs ~config ~handle () = 305 - let local_path = Fpath.(Verse_config.verse_path config / handle) in 306 - if not (is_directory ~fs local_path) then 307 - Error (Member_not_found handle) 254 + (** Clone or pull a single git repo. Returns Ok true if cloned, Ok false if pulled. *) 255 + let clone_or_pull_repo ~proc ~fs ~url ~branch path = 256 + if Git.is_repo ~proc ~fs path then begin 257 + match Git.pull ~proc ~fs path with 258 + | Error e -> Error e 259 + | Ok () -> Ok false 260 + end 308 261 else begin 309 - rm_rf ~fs local_path; 310 - Ok () 262 + let url = Uri.of_string url in 263 + match Git.clone ~proc ~fs ~url ~branch path with 264 + | Error e -> Error e 265 + | Ok () -> Ok true 311 266 end 312 267 313 - let add_all ~proc ~fs ~sw ~env ~config () = 314 - Logs.info (fun m -> m "Adding all registry members"); 315 - (* Load registry *) 268 + let pull ~proc ~fs ~config ?handle () = 269 + (* Load registry to get all members *) 316 270 match Verse_registry.clone_or_pull ~proc ~fs ~config () with 317 271 | Error msg -> Error (Registry_error msg) 318 272 | Ok registry -> 319 - (* Get already tracked handles to skip them *) 320 - let tracked = get_tracked_handles ~fs config in 321 - let tracked_set = Hashtbl.create (List.length tracked) in 322 - List.iter (fun h -> Hashtbl.add tracked_set h ()) tracked; 323 - (* Ensure verse directory exists *) 324 - let verse_dir = Verse_config.verse_path config in 325 - ensure_dir ~fs verse_dir; 326 - (* Add each member that isn't already tracked *) 327 - let added = ref [] in 328 - let errors = 329 - List.filter_map 330 - (fun (member : Verse_registry.member) -> 331 - let handle = member.handle in 332 - if Hashtbl.mem tracked_set handle then begin 333 - Logs.info (fun m -> m "Skipping %s (already tracked)" handle); 334 - None 335 - end 336 - else begin 337 - (* Validate handle *) 338 - match validate_handle ~sw ~env handle with 339 - | Error e -> 340 - Logs.warn (fun m -> m "Skipping %s: %a" handle pp_error e); 341 - Some (Fmt.str "%s: %a" handle pp_error e) 342 - | Ok () -> 343 - let local_path = Fpath.(verse_dir / handle) in 344 - let url = Uri.of_string member.monorepo in 345 - Logs.info (fun m -> m "Cloning %s from %s" handle member.monorepo); 346 - match Git.clone ~proc ~fs ~url ~branch:Verse_config.default_branch local_path with 347 - | Error e -> 348 - Logs.warn (fun m -> m "Failed to clone %s: %a" handle Git.pp_error e); 349 - Some (Fmt.str "%s: %a" handle Git.pp_error e) 350 - | Ok () -> 351 - Logs.info (fun m -> m "Cloned %s" handle); 352 - added := member :: !added; 353 - None 354 - end) 355 - registry.members 273 + let members = match handle with 274 + | Some h -> 275 + (match Verse_registry.find_member registry ~handle:h with 276 + | Some m -> [m] 277 + | None -> []) 278 + | None -> registry.members 356 279 in 357 - if errors = [] then Ok (List.rev !added) 358 - else Error (Git_error (Git.Io_error (String.concat "; " errors))) 359 - 360 - let pull ~proc ~fs ~config ?handle () = 361 - match handle with 362 - | Some h -> 363 - Logs.info (fun m -> m "Pulling %s" h); 364 - let local_path = Fpath.(Verse_config.verse_path config / h) in 365 - if not (Git.is_repo ~proc ~fs local_path) then 366 - Error (Member_not_found h) 367 - else 368 - (match Git.pull ~proc ~fs local_path with 369 - | Error e -> 370 - Logs.err (fun m -> m "Failed to pull %s: %a" h Git.pp_error e); 371 - Error (Git_error e) 372 - | Ok () -> 373 - Logs.info (fun m -> m "Pulled %s" h); 374 - Ok ()) 375 - | None -> 376 - (* Pull all tracked members *) 377 - let tracked_handles = get_tracked_handles ~fs config in 378 - Logs.info (fun m -> m "Pulling %d tracked members" (List.length tracked_handles)); 379 - let errors = 380 - List.filter_map 381 - (fun h -> 382 - let local_path = Fpath.(Verse_config.verse_path config / h) in 383 - if Git.is_repo ~proc ~fs local_path then begin 384 - Logs.info (fun m -> m "Pulling %s" h); 385 - match Git.pull ~proc ~fs local_path with 386 - | Error e -> 387 - Logs.warn (fun m -> m "Failed to pull %s: %a" h Git.pp_error e); 388 - Some (Fmt.str "%s: %a" h Git.pp_error e) 389 - | Ok () -> 390 - Logs.info (fun m -> m "Pulled %s" h); 391 - None 392 - end 393 - else begin 394 - Logs.warn (fun m -> m "Skipping %s: not a git repo" h); 395 - None 396 - end) 397 - tracked_handles 398 - in 399 - if errors = [] then Ok () 400 - else Error (Git_error (Git.Io_error (String.concat "; " errors))) 280 + if members = [] && handle <> None then 281 + Error (Member_not_found (Option.get handle)) 282 + else begin 283 + let verse_dir = Verse_config.verse_path config in 284 + ensure_dir ~fs verse_dir; 285 + Logs.info (fun m -> m "Syncing %d members" (List.length members)); 286 + let errors = 287 + List.filter_map 288 + (fun (member : Verse_registry.member) -> 289 + let h = member.handle in 290 + let mono_path = Fpath.(verse_dir / h) in 291 + let opam_path = Fpath.(verse_dir / (h ^ "-opam")) in 292 + (* Clone or pull monorepo *) 293 + Logs.info (fun m -> m "Syncing %s monorepo" h); 294 + let mono_result = 295 + clone_or_pull_repo ~proc ~fs ~url:member.monorepo 296 + ~branch:Verse_config.default_branch mono_path 297 + in 298 + let mono_err = match mono_result with 299 + | Ok true -> Logs.info (fun m -> m " Cloned %s monorepo" h); None 300 + | Ok false -> Logs.info (fun m -> m " Pulled %s monorepo" h); None 301 + | Error e -> 302 + Logs.warn (fun m -> m " Failed %s monorepo: %a" h Git.pp_error e); 303 + Some (Fmt.str "%s monorepo: %a" h Git.pp_error e) 304 + in 305 + (* Clone or pull opam repo *) 306 + Logs.info (fun m -> m "Syncing %s opam repo" h); 307 + let opam_result = 308 + clone_or_pull_repo ~proc ~fs ~url:member.opamrepo 309 + ~branch:Verse_config.default_branch opam_path 310 + in 311 + let opam_err = match opam_result with 312 + | Ok true -> Logs.info (fun m -> m " Cloned %s opam repo" h); None 313 + | Ok false -> Logs.info (fun m -> m " Pulled %s opam repo" h); None 314 + | Error e -> 315 + Logs.warn (fun m -> m " Failed %s opam repo: %a" h Git.pp_error e); 316 + Some (Fmt.str "%s opam: %a" h Git.pp_error e) 317 + in 318 + match (mono_err, opam_err) with 319 + | None, None -> None 320 + | Some e, None | None, Some e -> Some e 321 + | Some e1, Some e2 -> Some (e1 ^ "; " ^ e2)) 322 + members 323 + in 324 + if errors = [] then Ok () 325 + else Error (Git_error (Git.Io_error (String.concat "; " errors))) 326 + end 401 327 402 328 let sync ~proc ~fs ~config () = 403 - (* Update registry *) 404 - match Verse_registry.clone_or_pull ~proc ~fs ~config () with 405 - | Error msg -> Error (Registry_error msg) 406 - | Ok _registry -> 407 - (* Pull all tracked members *) 408 - pull ~proc ~fs ~config () 329 + (* pull already updates registry and syncs all members *) 330 + pull ~proc ~fs ~config () 409 331 410 332 (** Scan a monorepo for subtree directories. 411 333 Returns a list of directory names that look like subtrees (have commits). *)
+6 -47
lib/verse.mli
··· 92 92 93 93 Pulls the latest registry before returning the member list. *) 94 94 95 - val add : 96 - proc:_ Eio.Process.mgr -> 97 - fs:Eio.Fs.dir_ty Eio.Path.t -> 98 - sw:Eio.Switch.t -> 99 - env:< clock : _ Eio.Time.clock ; net : _ Eio.Net.t ; fs : Eio.Fs.dir_ty Eio.Path.t ; .. > -> 100 - config:Verse_config.t -> 101 - handle:string -> 102 - unit -> 103 - (unit, error) result 104 - (** [add ~proc ~fs ~sw ~env ~config ~handle ()] adds a member to the workspace. 105 - 106 - Validates the handle against tangled, looks up the monorepo URL from the 107 - registry, and clones it to [verse/<handle>/]. 108 - 109 - @param handle Tangled handle of the member to add *) 110 - 111 - val add_all : 112 - proc:_ Eio.Process.mgr -> 113 - fs:Eio.Fs.dir_ty Eio.Path.t -> 114 - sw:Eio.Switch.t -> 115 - env:< clock : _ Eio.Time.clock ; net : _ Eio.Net.t ; fs : Eio.Fs.dir_ty Eio.Path.t ; .. > -> 116 - config:Verse_config.t -> 117 - unit -> 118 - (Verse_registry.member list, error) result 119 - (** [add_all ~proc ~fs ~sw ~env ~config ()] adds all registry members to the workspace. 120 - 121 - Iterates over all members in the registry and clones their monorepos to 122 - [verse/<handle>/]. Members already tracked are skipped. 123 - 124 - Returns the list of members that were added. *) 125 - 126 - val remove : 127 - fs:Eio.Fs.dir_ty Eio.Path.t -> 128 - config:Verse_config.t -> 129 - handle:string -> 130 - unit -> 131 - (unit, error) result 132 - (** [remove ~fs ~config ~handle ()] removes a member from the workspace. 133 - 134 - Deletes the member's monorepo clone from [verse/<handle>/]. 135 - 136 - @param handle Tangled handle of the member to remove *) 137 - 138 95 val pull : 139 96 proc:_ Eio.Process.mgr -> 140 97 fs:Eio.Fs.dir_ty Eio.Path.t -> ··· 142 99 ?handle:string -> 143 100 unit -> 144 101 (unit, error) result 145 - (** [pull ~proc ~fs ~config ?handle ()] pulls updates for members. 102 + (** [pull ~proc ~fs ~config ?handle ()] syncs all registry members. 103 + 104 + For each member in the registry, clones or pulls both their monorepo 105 + (to [verse/<handle>/]) and their opam repo (to [verse/<handle>-opam/]). 146 106 147 - If [handle] is specified, only pulls that member. Otherwise pulls all 148 - tracked members. 107 + If [handle] is specified, only syncs that specific member. 149 108 150 - @param handle Optional specific member to pull *) 109 + @param handle Optional specific member to sync *) 151 110 152 111 val sync : 153 112 proc:_ Eio.Process.mgr ->