···4646}
4747(** Immutable collection of all loaded daily changes. *)
48484949+val pp : t Fmt.t
5050+(** Pretty-printer for daily changes. *)
5151+4952(** {1 Construction} *)
50535154val empty : t
+3-4
lib/doctor.ml
···849849 {
850850 action_priority = Medium;
851851 description =
852852- Printf.sprintf "Run monopam sync to resolve %d local sync issues"
852852+ Fmt.str "Run monopam sync to resolve %d local sync issues"
853853 repos_need_sync;
854854 command = Some "monopam sync";
855855 }
···865865 {
866866 action_priority = Medium;
867867 description =
868868- Printf.sprintf "Pull upstream changes for %d repos"
869869- repos_behind_upstream;
868868+ Fmt.str "Pull upstream changes for %d repos" repos_behind_upstream;
870869 command = Some "monopam sync";
871870 }
872871 :: !recommendations;
···10111010 Jsont_bytesrw.encode_string ~format:Jsont.Indent report_jsont report
10121011 with
10131012 | Ok s -> s
10141014- | Error e -> failwith (Printf.sprintf "Failed to encode report: %s" e)
10131013+ | Error e -> Fmt.failwith "Failed to encode report: %s" e
1015101410161015(** {1 Health Status} *)
10171016
+5
lib/dune_project.ml
···1414 packages : string list;
1515}
16161717+let pp ppf t =
1818+ Fmt.pf ppf "@[<v>name: %s@ packages: [%a]@]" t.name
1919+ Fmt.(list ~sep:(any ", ") string)
2020+ t.packages
2121+1722module Sexp = Sexplib0.Sexp
18231924(** Extract string from a Sexp.Atom, or None if it's a List *)
+3
lib/dune_project.mli
···1818}
1919(** Parsed dune-project file. *)
20202121+val pp : t Fmt.t
2222+(** Pretty-printer for parsed dune-project. *)
2323+2124val parse : string -> (t, string) result
2225(** [parse content] parses a dune-project file content and extracts metadata.
2326 Returns [Error msg] if parsing fails or required fields are missing. *)
+2-2
lib/feature.ml
···1414 | Git_error _ -> Some "Check that the monorepo is properly initialized"
1515 | Feature_exists name ->
1616 Some
1717- (Printf.sprintf
1717+ (Fmt.str
1818 "Run 'monopam feature remove %s' first if you want to recreate it"
1919 name)
2020 | Feature_not_found name ->
2121 Some
2222- (Printf.sprintf
2222+ (Fmt.str
2323 "Run 'monopam feature list' to see available features, or 'monopam \
2424 feature add %s' to create it"
2525 name)
+3-3
lib/fork_join.ml
···280280 String.sub path 1 (String.length path - 1)
281281 else path
282282 in
283283- Printf.sprintf "git@github.com:%s" path
283283+ Fmt.str "git@github.com:%s" path
284284 | Some ("https" | "http"), Some "gitlab.com" ->
285285 (* https://gitlab.com/user/repo.git -> git@gitlab.com:user/repo.git *)
286286 let path =
···288288 String.sub path 1 (String.length path - 1)
289289 else path
290290 in
291291- Printf.sprintf "git@gitlab.com:%s" path
291291+ Fmt.str "git@gitlab.com:%s" path
292292 | Some ("https" | "http"), _ when is_tangled_host host ->
293293 (* https://tangled.sh/@handle/repo -> git@<knot>:handle/repo *)
294294 let path =
···310310 in
311311 (* Use provided knot or default to git.recoil.org *)
312312 let knot_server = Option.value ~default:"git.recoil.org" knot in
313313- Printf.sprintf "git@%s:%s" knot_server path
313313+ Fmt.str "git@%s:%s" knot_server path
314314 | _ ->
315315 (* Return original URL for other cases *)
316316 url
+1-1
lib/git_cli.ml
···33(** Read user info from global git config. *)
44let global_git_user () =
55 let read_config key =
66- let ic = Unix.open_process_in (Printf.sprintf "git config %s" key) in
66+ let ic = Unix.open_process_in (Fmt.str "git config %s" key) in
77 let value =
88 try Some (String.trim (input_line ic)) with End_of_file -> None
99 in
+1
lib/monorepo_pkg.ml
···1212 opam_content : string;
1313}
14141515+let pp ppf t = Fmt.pf ppf "@[<v>%s (subtree: %s)@]" t.pkg_name t.subtree
1516let name t = t.pkg_name
1617let subtree t = t.subtree
1718let dev_repo t = t.dev_repo
+3
lib/monorepo_pkg.mli
···88 opam_content : string;
99}
10101111+val pp : t Fmt.t
1212+(** Pretty-printer for monorepo package. *)
1313+1114val name : t -> string
1215(** Package name from the opam file. *)
1316
+3-3
lib/opam_repo.ml
···206206 (fun line ->
207207 let trimmed = String.trim line in
208208 if String.starts_with ~prefix:"dev-repo:" trimmed then
209209- Printf.sprintf {|dev-repo: "%s"|} dev_repo_url
209209+ Fmt.str {|dev-repo: "%s"|} dev_repo_url
210210 else line)
211211 lines
212212 in
···236236 if String.starts_with ~prefix:"}" trimmed then
237237 (* End of url block - output our replacement *)
238238 let replacement =
239239- [ "url {"; Printf.sprintf {| src: "%s"|} url_src; "}" ]
239239+ [ "url {"; Fmt.str {| src: "%s"|} url_src; "}" ]
240240 in
241241 process rest false (List.rev_append replacement acc)
242242 else
···248248 if String.ends_with ~suffix:"}" trimmed then
249249 (* Single-line url block *)
250250 let replacement =
251251- [ "url {"; Printf.sprintf {| src: "%s"|} url_src; "}" ]
251251+ [ "url {"; Fmt.str {| src: "%s"|} url_src; "}" ]
252252 in
253253 process rest false (List.rev_append replacement acc)
254254 else process rest true acc
···1313}
14141515let create ~total phase_name =
1616- let msg = Printf.sprintf "%s (0/%d)" phase_name total in
1616+ let msg = Fmt.str "%s (0/%d)" phase_name total in
1717 let progress = Tty.Progress.create ~total msg in
1818 { progress; completed = Atomic.make 0; total; phase_name }
19192020let tick t name =
2121 let n = Atomic.fetch_and_add t.completed 1 + 1 in
2222- let msg = Printf.sprintf "%s: %s (%d/%d)" t.phase_name name n t.total in
2222+ let msg = Fmt.str "%s: %s (%d/%d)" t.phase_name name n t.total in
2323 Tty.Progress.message t.progress msg;
2424 Tty.Progress.set t.progress n
2525