ocaml / opam

opam is a source-based package manager. It supports multiple simultaneous compiler installations, flexible package constraints, and a Git-friendly development workflow.
https://opam.ocaml.org
Other
1.21k stars 348 forks source link

Non-deterministic behaviour of dose3/conflict messages #6061

Closed kit-ty-kate closed 3 days ago

kit-ty-kate commented 3 days ago

Noticed in https://github.com/ocaml/opam/pull/6045 and disappeared in subsequent unrelated pushes.

Full diff in CI:

diff --git a/_build/default/tests/reftests/empty-conflicts-002.test b/_build/default/tests/reftests/empty-conflicts-002.out
index 07ded8e..51ab14b 100644
--- a/_build/default/tests/reftests/empty-conflicts-002.test
+++ b/_build/default/tests/reftests/empty-conflicts-002.out
@@ -57,12 +57,12 @@ Done.
     You can temporarily relax the switch invariant with `--update-invariant'
   * No agreement on the version of ocaml-base-compiler:
     - (invariant) -> ocaml-base-compiler = 4.14.0
-    - fstar >= 2022.01.15 -> ppxlib < 0.26.0 -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.4
+    - fstar >= 2022.01.15 -> ppxlib < 0.26.0 -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.2
   * No agreement on the version of ppxlib:
     - fstar >= 2022.01.15 -> ppx_deriving_yojson -> ppxlib >= 0.26.0
     - fstar >= 2022.01.15 -> ppxlib < 0.26.0
   * Missing dependency:
-    - fstar >= 2022.01.15 -> ppxlib < 0.26.0 -> ocaml < 4.08.0 -> ocaml-variants >= 3.11.1 -> ocaml-beta
+    - fstar >= 2022.01.15 -> ppxlib < 0.26.0 -> ocaml < 4.08.0 -> ocaml-variants >= 3.09.3 -> ocaml-beta
     unmet availability conditions: 'enable-ocaml-beta-repository'

 No solution found, exiting
File "tests/reftests/empty-conflicts-002.test", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/tests/reftests/empty-conflicts-002.test _build/default/tests/reftests/empty-conflicts-002.out
Command exited with code 1.
diff --git a/_build/default/tests/reftests/empty-conflicts-003.test b/_build/default/tests/reftests/empty-conflicts-003.out
index 4f78b92..184e863 100644
--- a/_build/default/tests/reftests/empty-conflicts-003.test
+++ b/_build/default/tests/reftests/empty-conflicts-003.out
@@ -26,58 +26,58 @@ Done.
     - disml -> yojson < 1.6.0
   * No agreement on the version of ocaml:
     - (invariant) -> ocaml-base-compiler = 4.14.0 -> ocaml = 4.14.0
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0
   * Incompatible packages:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune
     - disml -> yojson < 1.6.0
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> ocaml < 4.08.0 -> ocaml-variants >= 4.02.1 -> ocaml-beta
-    unmet availability conditions: 'enable-ocaml-beta-repository'
-  * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler < 3.07+1 | ocaml-system < 3.07+1 | ocaml-variants < 3.8~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler < 3.07+1 | ocaml-system < 3.07+1 | ocaml-variants < 3.8~
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
     unmet availability conditions: 'sys-ocaml-version = "3.07"'
     no matching version
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.07+1 | ocaml-system = 3.07+1 | ocaml-variants < 3.8~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.07+1 | ocaml-system = 3.07+1 | ocaml-variants < 3.8~
File "tests/reftests/empty-conflicts-003.test", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/tests/reftests/empty-conflicts-003.test _build/default/tests/reftests/empty-conflicts-003.out
Command exited with code 1.
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
     unmet availability conditions: 'sys-ocaml-version = "3.07+1"'
     no matching version
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.07+2 | ocaml-system = 3.07+2 | ocaml-variants < 3.8~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.07+2 | ocaml-system = 3.07+2 | ocaml-variants < 3.8~
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
     unmet availability conditions: 'sys-ocaml-version = "3.07+2"'
     no matching version
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.0 | ocaml-system < 3.08.1~ | ocaml-variants < 3.08.1~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.0 | ocaml-system < 3.08.1~ | ocaml-variants < 3.08.1~
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
     unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.0"'
     no matching version
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.1 | ocaml-system < 3.08.2~ | ocaml-variants < 3.08.2~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.1 | ocaml-system < 3.08.2~ | ocaml-variants < 3.08.2~
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
     unmet availability conditions, e.g. 'sys-ocaml-version = "3.08.1"'
     no matching version
   * Missing dependency:
-    - disml -> ppx_deriving_yojson >= 3.3 -> result -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.2 | ocaml-system < 3.08.3~ | ocaml-variants < 3.08.3~
+    - disml -> ppx_deriving_yojson >= 3.3 -> dune -> ocaml < 4.08.0 -> ocaml-base-compiler = 3.08.2 | ocaml-system < 3.08.3~ | ocaml-variants < 3.08.3~
     unmet availability conditions: 'arch != "arm64" & arch != "arm32" & arch != "ppc64"'
Command exited with code 1.
File "tests/reftests/unhelpful-conflicts-001.test", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/tests/reftests/unhelpful-conflicts-001.test _build/default/tests/reftests/unhelpful-conflicts-001.out
Command exited with code 1.
diff --git a/_build/default/tests/reftests/unhelpful-conflicts-001.test b/_build/default/tests/reftests/unhelpful-conflicts-001.out
index 9148315..72981eb 100644
--- a/_build/default/tests/reftests/unhelpful-conflicts-001.test
+++ b/_build/default/tests/reftests/unhelpful-conflicts-001.out
@@ -19,10 +19,13 @@ Faking installation of ocaml-options-vanilla.1
 Done.
 ### opam install dune-release
Error: ] Package conflict!
+  * No agreement on the version of ocaml:
+    - (invariant) -> ocaml-base-compiler >= 5.0.0~alpha0 -> ocaml = 5.0.0
+    - dune-release -> fmt < 0.8.7 -> ocaml < 5.0
+    You can temporarily relax the switch invariant with `--update-invariant'
   * No agreement on the version of ocaml-base-compiler:
     - (invariant) -> ocaml-base-compiler >= 5.0.0~alpha0
     - dune-release -> fmt < 0.8.7 -> ocaml < 5.0 -> ocaml-base-compiler = 4.10.2
-    You can temporarily relax the switch invariant with `--update-invariant'
   * Missing dependency:
     - dune-release -> fmt < 0.8.7 -> ocaml < 5.0 -> ocaml-base-compiler = 4.08.1 | ocaml-system >= 4.08.1 | ocaml-variants < 4.08.2~
     unmet availability conditions: '!(os = "macos" & arch = "arm64")'
diff --git a/_build/default/tests/reftests/list-coinstallable.test b/_build/default/tests/reftests/list-coinstallable.out
index e97eaf6..16d3256 100644
--- a/_build/default/tests/reftests/list-coinstallable.test
+++ b/_build/default/tests/reftests/list-coinstallable.out
@@ -6356,6 +6356,7 @@ opam-bin.0.9.4
 opam-bin.0.9.5
 opam-bin.1.0.0
 opam-bin.1.1.0
+opam-build.0.1.0
 opam-bundle.0.3
 opam-bundle.0.4
 opam-ci.1.0.0
@@ -6551,6 +6552,7 @@ opam-state.2.1.0~rc2
 opam-state.2.1.0
 opam-state.2.1.1
 opam-state.2.1.2
+opam-test.0.1.0
 opam_bin_lib.0.9.4
 opam_bin_lib.0.9.5
 opam_bin_lib.1.0.0
rjbou commented 3 days ago

It is not completely unrelated, what changes is the content of the opam-version variable: 2.2.0 -> 2.3.0. It had an effect on the selection of packages. Ideally, we should have these tests more stable, but they are hard to minimise strictly.