Monorepo management for opam overlays
0
fork

Configure Feed

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

Add logging to monopam verse pull command

The verse pull command was silently iterating through tracked members
without any feedback. Now shows INFO logs for each member being pulled.

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

+21 -6
+21 -6
lib/verse.ml
··· 360 360 let pull ~proc ~fs ~config ?handle () = 361 361 match handle with 362 362 | Some h -> 363 + Logs.info (fun m -> m "Pulling %s" h); 363 364 let local_path = Fpath.(Verse_config.verse_path config / h) in 364 365 if not (Git.is_repo ~proc ~fs local_path) then 365 366 Error (Member_not_found h) 366 367 else 367 368 (match Git.pull ~proc ~fs local_path with 368 - | Error e -> Error (Git_error e) 369 - | Ok () -> Ok ()) 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 ()) 370 375 | None -> 371 376 (* Pull all tracked members *) 372 377 let tracked_handles = get_tracked_handles ~fs config in 378 + Logs.info (fun m -> m "Pulling %d tracked members" (List.length tracked_handles)); 373 379 let errors = 374 380 List.filter_map 375 381 (fun h -> 376 382 let local_path = Fpath.(Verse_config.verse_path config / h) in 377 - if Git.is_repo ~proc ~fs local_path then 383 + if Git.is_repo ~proc ~fs local_path then begin 384 + Logs.info (fun m -> m "Pulling %s" h); 378 385 match Git.pull ~proc ~fs local_path with 379 - | Error e -> Some (Fmt.str "%s: %a" h Git.pp_error e) 380 - | Ok () -> None 381 - else None) 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) 382 397 tracked_handles 383 398 in 384 399 if errors = [] then Ok ()