this repo has no description
0
fork

Configure Feed

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

Add --all flag to opam-all command

When specified, builds all packages from ocamlfind list instead of
requiring explicit package names on the command line.

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

+17 -5
+17 -5
bin/jtw.ml
··· 381 381 let local_meta_path = Fpath.(v "lib" // meta_rel / "META" |> to_string) in 382 382 (pkg_path, local_meta_path, pkg_deps) 383 383 384 - let opam_all verbose output_dir_str switch libraries no_worker = 384 + let opam_all verbose output_dir_str switch libraries no_worker all_pkgs = 385 385 Opam.switch := switch; 386 386 387 387 (* Get all packages and their dependencies *) 388 - let all_packages = match Ocamlfind.deps libraries with 389 - | Ok l -> "stdlib" :: l 390 - | Error (`Msg m) -> failwith ("Failed to find libs: " ^ m) 388 + let all_packages = 389 + if all_pkgs then 390 + (* Build all installed packages *) 391 + Ocamlfind.all () 392 + else if libraries = [] then 393 + (* No packages specified, just stdlib *) 394 + ["stdlib"] 395 + else 396 + match Ocamlfind.deps libraries with 397 + | Ok l -> "stdlib" :: l 398 + | Error (`Msg m) -> failwith ("Failed to find libs: " ^ m) 391 399 in 392 400 393 401 (* Remove duplicates and sort *) ··· 523 531 let doc = "Opam switch to use" in 524 532 Arg.(value & opt (some string) None & info [ "switch" ] ~doc) 525 533 in 534 + let all_pkgs = 535 + let doc = "Build all installed packages (from ocamlfind list)" in 536 + Arg.(value & flag & info [ "all" ] ~doc) 537 + in 526 538 let info = Cmd.info "opam-all" ~doc:"Generate universes for all packages and their dependencies" in 527 539 Cmd.v info 528 - Term.(ret (const opam_all $ verbose $ output_dir $ switch $ libraries $ no_worker)) 540 + Term.(ret (const opam_all $ verbose $ output_dir $ switch $ libraries $ no_worker $ all_pkgs)) 529 541 530 542 let main_cmd = 531 543 let doc = "An odoc notebook tool" in