···26 | Repo_error of Opam_repo.error
27 | Git_error of Git.error
28 | Dirty_state of Package.t list
029 | Package_not_found of string
30 | Claude_error of string
31···37 Fmt.pf ppf "Dirty packages: %a"
38 Fmt.(list ~sep:comma (using Package.name string))
39 pkgs
040 | Package_not_found name -> Fmt.pf ppf "Package not found: %s" name
41 | Claude_error msg -> Fmt.pf ppf "Claude error: %s" msg
42···74 Some
75 "Commit changes in the monorepo first: cd mono && git add -A && git \
76 commit"
0077 | Package_not_found _ ->
78 Some "Check available packages: ls opam-repo/packages/"
79 | Claude_error msg when String.starts_with ~prefix:"Failed to decode" msg ->
···1579 match ensure_monorepo_initialized ~proc ~fs:fs_t ~config with
1580 | Error e -> Error e
1581 | Ok () -> (
00000001582 (* Regenerate opam-repo from monorepo to ensure URLs are up to date *)
1583 regenerate_opam_repo ~fs:(fs_t :> _ Eio.Path.t) ~config ();
1584 match discover_packages ~fs:(fs_t :> _ Eio.Path.t) ~config () with
···19011902 Ok summary
1903 end
1904- end)
019051906(* Opam metadata sync: copy .opam files from monorepo subtrees to opam-repo *)
1907
···26 | Repo_error of Opam_repo.error
27 | Git_error of Git.error
28 | Dirty_state of Package.t list
29+ | Monorepo_dirty
30 | Package_not_found of string
31 | Claude_error of string
32···38 Fmt.pf ppf "Dirty packages: %a"
39 Fmt.(list ~sep:comma (using Package.name string))
40 pkgs
41+ | Monorepo_dirty -> Fmt.pf ppf "Monorepo has uncommitted changes"
42 | Package_not_found name -> Fmt.pf ppf "Package not found: %s" name
43 | Claude_error msg -> Fmt.pf ppf "Claude error: %s" msg
44···76 Some
77 "Commit changes in the monorepo first: cd mono && git add -A && git \
78 commit"
79+ | Monorepo_dirty ->
80+ Some "Commit or stash your changes first: git status && git add -A && git commit"
81 | Package_not_found _ ->
82 Some "Check available packages: ls opam-repo/packages/"
83 | Claude_error msg when String.starts_with ~prefix:"Failed to decode" msg ->
···1583 match ensure_monorepo_initialized ~proc ~fs:fs_t ~config with
1584 | Error e -> Error e
1585 | Ok () -> (
1586+ (* Check for uncommitted changes in monorepo *)
1587+ let monorepo = Config.Paths.monorepo config in
1588+ if Git.is_dirty ~proc ~fs:fs_t monorepo then begin
1589+ Log.err (fun m -> m "Monorepo has uncommitted changes");
1590+ Error Monorepo_dirty
1591+ end
1592+ else begin
1593 (* Regenerate opam-repo from monorepo to ensure URLs are up to date *)
1594 regenerate_opam_repo ~fs:(fs_t :> _ Eio.Path.t) ~config ();
1595 match discover_packages ~fs:(fs_t :> _ Eio.Path.t) ~config () with
···19121913 Ok summary
1914 end
1915+ end
1916+ end)
19171918(* Opam metadata sync: copy .opam files from monorepo subtrees to opam-repo *)
1919
+1
lib/monopam.mli
···50 | Git_error of Git.error (** Git operation error *)
51 | Dirty_state of Package.t list
52 (** Operation blocked due to dirty packages *)
053 | Package_not_found of string (** Named package not found in opam repo *)
54 | Claude_error of string (** Claude API or response parsing error *)
55
···50 | Git_error of Git.error (** Git operation error *)
51 | Dirty_state of Package.t list
52 (** Operation blocked due to dirty packages *)
53+ | Monorepo_dirty (** Monorepo has uncommitted changes *)
54 | Package_not_found of string (** Named package not found in opam repo *)
55 | Claude_error of string (** Claude API or response parsing error *)
56