Merge pull request 'In Opamdiff.compare, do not figure out unchanged packages.' (#134) from opamdiff-not-same into main
Reviewed-on: https://git.robur.io/robur/builder-web/pulls/134
This commit is contained in:
commit
45f9a5a396
2 changed files with 5 additions and 12 deletions
|
@ -848,7 +848,7 @@ let compare_builds
|
|||
~(build_right : Builder_db.Build.t)
|
||||
~env_diff:(added_env, removed_env, changed_env)
|
||||
~pkg_diff:(added_pkgs, removed_pkgs, changed_pkgs)
|
||||
~opam_diff:(same, opam_diff, version_diff, left, right)
|
||||
~opam_diff:(opam_diff, version_diff, left, right)
|
||||
=
|
||||
layout
|
||||
~nav:(`Comparison ((job_left, build_left), (job_right, build_right)))
|
||||
|
@ -902,10 +902,6 @@ let compare_builds
|
|||
[txtf "%d opam packages with changes in their opam file"
|
||||
(List.length opam_diff)]
|
||||
];
|
||||
H.li [
|
||||
H.a ~a:H.[a_href "#opam-packages-unchanged"]
|
||||
[txtf "%d opam packages unchanged" (OpamPackage.Set.cardinal same)]
|
||||
];
|
||||
H.li [
|
||||
H.a ~a:H.[a_href "#env-added"]
|
||||
[ txtf "%d environment variables added" (List.length added_env)]
|
||||
|
@ -943,9 +939,6 @@ let compare_builds
|
|||
H.h3 ~a:H.[a_id "opam-packages-opam-diff"]
|
||||
[H.txt "Opam packages with changes in their opam file"]] @
|
||||
opam_diffs opam_diff @ [
|
||||
H.h3 ~a:H.[a_id "opam-packages-unchanged"]
|
||||
[H.txt "Unchanged opam packages"];
|
||||
H.code (packages same);
|
||||
H.h3 ~a:H.[a_id "env-added"] [H.txt "Environment variables added"];
|
||||
H.code (key_values added_env);
|
||||
H.h3 ~a:H.[a_id "env-removed"] [H.txt "Environment variables removed"];
|
||||
|
|
|
@ -102,12 +102,12 @@ let compare left right =
|
|||
l
|
||||
in
|
||||
let same_version = Set.inter packages_left packages_right in
|
||||
let (same, opam_diff) =
|
||||
Set.partition
|
||||
let opam_diff =
|
||||
Set.filter
|
||||
(fun p ->
|
||||
let find = OpamPackage.Name.Map.find p.name in
|
||||
let opam_left = find left.overlays and opam_right = find right.overlays in
|
||||
OpamFile.OPAM.effectively_equal opam_left opam_right)
|
||||
not (OpamFile.OPAM.effectively_equal opam_left opam_right))
|
||||
same_version
|
||||
and version_diff =
|
||||
List.filter_map (fun p1 ->
|
||||
|
@ -126,4 +126,4 @@ let compare left right =
|
|||
and right_pkgs = diff packages_right packages_left
|
||||
in
|
||||
let opam_diff = detailed_opam_diffs left right opam_diff in
|
||||
(same, opam_diff, version_diff, left_pkgs, right_pkgs)
|
||||
(opam_diff, version_diff, left_pkgs, right_pkgs)
|
||||
|
|
Loading…
Reference in a new issue