Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/solver/opamCudfSolver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ let make_custom_solver name args criteria =


let default_solver_selection =
(module OpamBuiltin0install: S) ::
OpamBuiltinMccs.all_backends @ [
(module OpamBuiltinZ3: S);
(module OpamBuiltin0install: S);
(module Aspcud: S);
(module Mccs: S);
(module Aspcud_old: S);
Expand Down
40 changes: 14 additions & 26 deletions tests/reftests/avoid-version.test
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,6 @@ The following actions will be faked:
Faking installation of b.1
Done.
### opam upgrade
Everything as up-to-date as possible

The following packages are not being upgraded because the new versions conflict with other installed packages:
- b.2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade b.2"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### opam upgrade b
The following actions will be faked:
=== downgrade 1 package
- downgrade a 3 to 2 [required by b]
Expand All @@ -90,17 +83,17 @@ The following actions will be faked:
Faking installation of a.2
Faking installation of b.2
Done.
### opam upgrade b
Already up-to-date.
Nothing to do.
### opam upgrade
The following actions will be faked:
=== downgrade 1 package
- downgrade b 2 to 1 [uses a]
=== upgrade 1 package
- upgrade a 2 to 3
Everything as up-to-date as possible

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.3
Faking installation of b.1
Done.
The following packages are not being upgraded because the new versions conflict with other installed packages:
- a.3
-- b.2 is installed and requires a = 2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade a.3"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### <pkg:a.4>
opam-version: "2.0"
flags: avoid-version
Expand All @@ -111,25 +104,20 @@ flags: avoid-version
Everything as up-to-date as possible

The following packages are not being upgraded because the new versions conflict with other installed packages:
- b.2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade b.2"), which will ask permission to downgrade or uninstall the conflicting packages.
- a.3
-- b.2 is installed and requires a = 2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade a.3"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### opam upgrade b.3
The following actions will be faked:
=== upgrade 1 package
- upgrade b 1 to 3
- upgrade b 2 to 3

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of b.3
Done.
### opam install a.2
The following actions will be faked:
=== downgrade 1 package
- downgrade a 3 to 2

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.2
Done.
[NOTE] Package a is already installed (current version is 2).
### opam upgrade
The following actions will be faked:
=== upgrade 1 package
Expand Down
9 changes: 8 additions & 1 deletion tests/reftests/best-effort.test
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ opam-version: "2.0"
opam-version: "2.0"
depends: ["unavailable"]
### opam install --show --best-effort test.2
Nothing to do.
[WARNING] Your solver configuration does not support --best-effort, the option was ignored (you need to specify variable OPAMBESTEFFORTCRITERIA, or set your criteria to maximise the count for cudf attribute 'opam-query')
[ERROR] Package conflict!
* Missing dependency:
- test >= 2 -> unavailable
unmet availability conditions: 'false'

No solution found, exiting
# Return code 20 #
43 changes: 14 additions & 29 deletions tests/reftests/deprecated.test
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,6 @@ The following actions will be faked:
Faking installation of b.1
Done.
### opam upgrade
Everything as up-to-date as possible

The following packages are not being upgraded because the new versions conflict with other installed packages:
- b.2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade b.2"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### opam upgrade b
The following actions will be faked:
=== downgrade 1 package
- downgrade a 3 to 2 (deprecated) [required by b]
Expand All @@ -96,17 +89,17 @@ Done.

<><> a.2 installed successfully <><><><><><><><><><><><><><><><><><><><><><><><>
=> Note: This package is deprecated.
### opam upgrade b
Already up-to-date.
Nothing to do.
### opam upgrade
The following actions will be faked:
=== downgrade 1 package
- downgrade b 2 to 1 [uses a]
=== upgrade 1 package
- upgrade a 2 (deprecated) to 3
Everything as up-to-date as possible

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.3
Faking installation of b.1
Done.
The following packages are not being upgraded because the new versions conflict with other installed packages:
- a.3
-- b.2 is installed and requires a = 2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade a.3"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### <pkg:a.4>
opam-version: "2.0"
flags: deprecated
Expand All @@ -117,13 +110,14 @@ flags: deprecated
Everything as up-to-date as possible

The following packages are not being upgraded because the new versions conflict with other installed packages:
- b.2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade b.2"), which will ask permission to downgrade or uninstall the conflicting packages.
- a.3
-- b.2 is installed and requires a = 2
However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade a.3"), which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
### opam upgrade b.3
The following actions will be faked:
=== upgrade 1 package
- upgrade b 1 to 3 (deprecated)
- upgrade b 2 to 3 (deprecated)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of b.3
Expand All @@ -132,16 +126,7 @@ Done.
<><> b.3 installed successfully <><><><><><><><><><><><><><><><><><><><><><><><>
=> Note: This package is deprecated.
### opam install a.2
The following actions will be faked:
=== downgrade 1 package
- downgrade a 3 to 2 (deprecated)

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of a.2
Done.

<><> a.2 installed successfully <><><><><><><><><><><><><><><><><><><><><><><><>
=> Note: This package is deprecated.
[NOTE] Package a is already installed (current version is 2).
### opam upgrade
The following actions will be faked:
=== upgrade 1 package
Expand Down
9 changes: 3 additions & 6 deletions tests/reftests/deps-only.test
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,11 @@ The following actions will be performed:
Done.
### opam install --deps-only lorem dolor
The following actions will be performed:
=== install 2 packages
=== install 1 package
- install ipsum 1 [required by dolor]
- install sit 1 [required by lorem]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> removed deps-of-lorem.1
-> installed ipsum.1
-> installed sit.1
Done.
### :III:5: deps of same packages, good version specified, already installed package
### opam switch create deps-conflicts-5 --empty
Expand Down Expand Up @@ -536,10 +533,10 @@ opam-version: "2.0"
### opam install --deps-only lorem dolor
The following actions will be performed:
=== install 1 package
- install sit 2 [required by lorem]
- install ipsum 1 [required by lorem]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed sit.2
-> installed ipsum.1
Done.
### opam switch create deps-conflicts-7b --empty
### # it takes lorem.1
Expand Down
96 changes: 51 additions & 45 deletions tests/reftests/install-formula.test
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,27 @@ Done.
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
The following actions will be faked:
=== install 21 packages
- install astring 0.8.3 [required by ocb-stubblr]
- install base-bytes base [required by astring]
- install bigarray-compat 1.0.0 [required by cstruct]
- install conf-m4 1 [required by ocamlfind]
- install conf-pkg-config 1.1 [required by ocaml-freestanding]
- install cppo 1.6.6 [required by lwt]
- install cstruct 5.0.0 [required by mirage-solo5]
- install dune 1.10.0 [required by cstruct]
- install logs 0.6.3 [required by mirage-solo5]
- install lwt 4.2.1 [required by mirage-solo5]
- install mirage-solo5 0.5.0
- install mmap 1.1.0 [required by lwt]
- install ocaml-freestanding 0.4.5 [required by mirage-solo5]
- install ocaml-src 4.08.0 [required by ocaml-freestanding]
- install ocamlbuild 0.14.0 [required by mirage-solo5]
- install ocamlfind 1.8.0 [required by mirage-solo5]
- install ocb-stubblr 0.1.1-1 [required by mirage-solo5]
- install result 1.4 [required by lwt, topkg]
- install seq base [required by lwt]
- install solo5-bindings-virtio 0.4.1 [required by mirage-solo5]
- install topkg 1.0.0 [required by mirage-solo5]
- install astring 0.8.3 [required by ocb-stubblr]
- install base-bytes base [required by astring]
- install bigarray-compat 1.0.0 [required by cstruct]
- install conf-m4 1 [required by ocamlfind]
- install conf-pkg-config 1.1 [required by ocaml-freestanding]
- install cppo 1.6.6 [required by lwt]
- install cstruct 5.0.0 [required by mirage-solo5]
- install dune 1.10.0 [required by cstruct]
- install logs 0.6.3 [required by mirage-solo5]
- install lwt 4.2.1 [required by mirage-solo5]
- install mirage-solo5 0.5.0
- install mmap 1.1.0 [required by lwt]
- install ocaml-freestanding 0.4.5 [required by mirage-solo5]
- install ocaml-src 4.08.0 [required by ocaml-freestanding]
- install ocamlbuild 0.14.0 [required by mirage-solo5]
- install ocamlfind 1.8.0 [required by mirage-solo5]
- install ocb-stubblr 0.1.1-1 [required by mirage-solo5]
- install result 1.4 [required by lwt, topkg]
- install seq base [required by lwt]
- install solo5-bindings-hvt 0.4.1 [required by mirage-solo5]
- install topkg 1.0.0 [required by mirage-solo5]

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
Faking installation of conf-m4.1
Expand All @@ -57,7 +57,7 @@ Faking installation of base-bytes.base
Faking installation of result.1.4
Faking installation of seq.base
Faking installation of lwt.4.2.1
Faking installation of solo5-bindings-virtio.0.4.1
Faking installation of solo5-bindings-hvt.0.4.1
Faking installation of ocaml-freestanding.0.4.5
Faking installation of topkg.1.0.0
Faking installation of astring.0.8.3
Expand Down Expand Up @@ -136,11 +136,13 @@ However, you may "opam upgrade" these packages explicitly at these versions (e.g
Nothing to do.
### opam upgrade mirage-solo5 --formula '"mirage-no-solo5"' --best-effort
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
The following actions would be faked:
=== remove 1 package
- remove mirage-solo5 0.5.0
=== install 1 package
- install mirage-no-solo5 1
[WARNING] Your solver configuration does not support --best-effort, the option was ignored (you need to specify variable OPAMBESTEFFORTCRITERIA, or set your criteria to maximise the count for cudf attribute 'opam-query')
[ERROR] Package conflict!
* Incompatible packages:
- mirage-no-solo5
- mirage-solo5 >= 0.5.0

# Return code 20 #
### OPAMSHOW=0 opam switch create test --empty
### opam install --formula '"ocaml-base-compiler" | "ocaml-system"'
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
Expand All @@ -156,12 +158,12 @@ The following actions would be faked:
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
The following actions would be faked:
=== install 6 packages
- install base-bigarray base
- install base-threads base
- install base-unix base
- install ocaml 4.08.0
- install ocaml-config 1 [required by ocaml]
- install ocaml-system 4.08.0
- install base-bigarray base
- install base-threads base
- install base-unix base
- install ocaml 4.08.0
- install ocaml-config 1 [required by ocaml]
- install ocaml-variants 4.08.0+spacetime
### opam install ocaml.4.07.0 --formula '"ocaml-base-compiler" | "ocaml-system"'
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
The following actions would be faked:
Expand Down Expand Up @@ -194,10 +196,10 @@ The following actions would be faked:
### opam install genet --formula '["mysql" ("conf-mariadb" & "mariadb" | "conf-postgresql")]'
[WARNING] Flag --formula is experimental, there is no guarantee that it will be kept; avoid using it in scripts.
The following actions would be faked:
=== install 67 packages
=== install 71 packages
- install base v0.12.2 [required by pcre]
- install base-bigarray base
- install base-bytes base [required by ocamlnet]
- install base-bytes base [required by ocamlnet, ctypes]
- install base-threads base [required by dune]
- install base-unix base [required by cppo]
- install biniou 1.2.0 [required by yojson]
Expand All @@ -211,18 +213,21 @@ The following actions would be faked:
- install conf-gtksourceview 2 [required by lablgtk, lablgtk-extras]
- install conf-libpcre 1 [required by pcre]
- install conf-m4 1 [required by ocamlfind]
- install conf-mariadb 1
- install conf-perl 1 [required by zarith]
- install conf-pkg-config 1.1 [required by conf-glade, conf-gnomecanvas]
- install conf-postgresql 1
- install conf-pkg-config 1.1 [required by conf-mariadb]
- install conf-which 1 [required by biniou]
- install conf-zlib 1 [required by cryptokit]
- install config-file 1.2 [required by genet]
- install cppo 1.6.6 [required by yojson]
- install cryptokit 1.13 [required by rdf]
- install ctypes 0.14.0 [required by mariadb]
- install ctypes-foreign 0.4.0 [required by mariadb]
- install dune 1.10.0 [required by js_of_ocaml, uri, pcre, etc.]
- install easy-format 1.3.1 [required by yojson]
- install gen 0.5.2 [required by sedlex]
- install genet 0.6
- install integers 0.2.2 [required by ctypes]
- install iri 0.4.0 [required by rdf, xtmpl]
- install jbuilder transition [required by biniou]
- install js_of_ocaml 3.3.0 [required by xtmpl]
Expand All @@ -231,28 +236,29 @@ The following actions would be faked:
- install jsonm 1.0.1 [required by rdf]
- install lablgtk 2.18.8 [required by genet]
- install lablgtk-extras 1.6 [required by genet]
- install mariadb 1.1.2
- install menhir 20190626 [required by genet]
- install mysql 1.2.2
- install ocaml 4.05.0 [required by genet, mysql]
- install ocaml 4.05.0 [required by mariadb, genet, mysql]
- install ocaml-base-compiler 4.05.0 [required by ocaml]
- install ocaml-config 1 [required by ocaml]
- install ocaml-migrate-parsetree 1.4.0 [required by js_of_ocaml, js_of_ocaml-ppx]
- install ocamlbuild 0.14.0 [required by menhir, ocamlnet]
- install ocaml-migrate-parsetree 1.2.0 [required by js_of_ocaml, js_of_ocaml-ppx]
- install ocamlbuild 0.14.0 [required by mariadb]
- install ocamldot 1.0 [required by genet]
- install ocamlfind 1.8.0 [required by genet, mysql]
- install ocamlfind 1.8.0 [required by mariadb, genet, mysql]
- install ocamlnet 4.1.6 [required by genet]
- install pcre 7.4.1 [required by genet]
- install ppx_derivers 1.2.1 [required by ocaml-migrate-parsetree]
- install ppx_tools 5.0+4.05.0 [required by xtmpl]
- install ppx_tools_versioned 5.2.3 [required by js_of_ocaml, js_of_ocaml-ppx]
- install ppx_tools_versioned 5.2 [required by js_of_ocaml, js_of_ocaml-ppx]
- install rdf 0.11.0 [required by genet]
- install re 1.9.0 [required by xtmpl]
- install result 1.4 [required by topkg, ocaml-migrate-parsetree]
- install sedlex 1.99.3 [required by rdf, xtmpl]
- install result 1.4 [required by topkg]
- install sedlex 1.99.4 [required by rdf, xtmpl]
- install seq 0.1 [required by re]
- install sexplib0 v0.12.0 [required by base]
- install stringext 1.6.0 [required by uri]
- install topkg 1.0.0 [required by jsonm, xmlm, uuidm]
- install topkg 1.0.0 [required by uuidm, xmlm, jsonm, integers]
- install uchar 0.0.2 [required by jsonm, js_of_ocaml]
- install uri 3.0.0 [required by rdf]
- install uuidm 0.9.7 [required by rdf]
Expand Down
Loading
Loading