remove more unneeded code
This commit is contained in:
parent
8c29161144
commit
f20227cfea
2 changed files with 16 additions and 38 deletions
|
@ -172,18 +172,6 @@ type opam_diff = {
|
|||
diff : string ;
|
||||
}
|
||||
|
||||
let commands_to_strings (l, r) =
|
||||
let v a =
|
||||
OpamPrinter.FullPos.value (OpamPp.print OpamFormat.V.command a)
|
||||
in
|
||||
List.map v l, List.map v r
|
||||
|
||||
let opt_url_to_string (l, r) =
|
||||
let url_to_s = function
|
||||
| None -> "" | Some u -> OpamFile.URL.write_to_string u
|
||||
in
|
||||
url_to_s l, url_to_s r
|
||||
|
||||
let pp_opam_diff ppf { pkg ; effectively_equal ; _ } =
|
||||
Format.fprintf ppf "%a%s"
|
||||
pp_opampackage pkg
|
||||
|
@ -276,8 +264,7 @@ let compare left right =
|
|||
("name", `String (OpamPackage.Name.to_string name));
|
||||
("version_left", `String (OpamPackage.Version.to_string version_left));
|
||||
("version_right", `String (OpamPackage.Version.to_string version_right))
|
||||
]
|
||||
) lst)
|
||||
]) lst)
|
||||
in
|
||||
let package_set_to_json set =
|
||||
`List (Set.fold (fun p acc ->
|
||||
|
@ -285,8 +272,7 @@ let compare left right =
|
|||
("name", `String (OpamPackage.Name.to_string p.OpamPackage.name));
|
||||
("version", `String (OpamPackage.Version.to_string p.OpamPackage.version))
|
||||
] in
|
||||
json :: acc
|
||||
) set [])
|
||||
json :: acc) set [])
|
||||
in
|
||||
let opam_diff_to_json opam_diff =
|
||||
`List (List.map (fun (diff : opam_diff) ->
|
||||
|
@ -294,9 +280,7 @@ let compare left right =
|
|||
("package_version", `String (OpamPackage.to_string diff.pkg));
|
||||
("effectively_equal", `Bool diff.effectively_equal);
|
||||
("diff", `String diff.diff);
|
||||
]
|
||||
|
||||
) opam_diff)
|
||||
]) opam_diff)
|
||||
in
|
||||
let duniverse_to_json = function
|
||||
| Ok (left, right, detailed_diff) ->
|
||||
|
@ -308,7 +292,6 @@ let compare left right =
|
|||
("name", `String diff.name);
|
||||
]) detailed_diff))
|
||||
]
|
||||
|
||||
| Error (`Msg msg) ->
|
||||
`String msg
|
||||
in
|
||||
|
|
|
@ -26,11 +26,6 @@ val pp_duniverse_dir : Format.formatter -> string * string -> unit
|
|||
|
||||
val pp_opam_diff : Format.formatter -> opam_diff -> unit
|
||||
|
||||
val commands_to_strings : OpamTypes.command list * OpamTypes.command list -> string list * string list
|
||||
|
||||
val opt_url_to_string : OpamFile.URL.t option * OpamFile.URL.t option -> string * string
|
||||
|
||||
|
||||
val compare : OpamFile.SwitchExport.t ->
|
||||
OpamFile.SwitchExport.t ->
|
||||
opam_diff list * version_diff list * OpamPackage.Set.t * OpamPackage.Set.t * ((string * string) list * (string * string) list * duniverse_diff list, [> `Msg of string ]) result
|
||||
|
|
Loading…
Reference in a new issue