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.23k stars 351 forks source link

Better description of an "opam upgrade" solution. #657

Closed hhugo closed 11 years ago

hhugo commented 11 years ago

It is sometime very hard to understand why "opam upgrade" decide to downgrade some packages. More information could make this easier

exemple: (I cannot spot what is/are the problematic packages)

[8861] HEURISTIC            no optimized solution found
[8861] SOLVER               resolve request=install:() remove:() upgrade:(yojson & xmlm & xml-light & tyxml & typerex & type%5fconv & ssl & sqlite3-ocaml & react & re & portola & pcre-ocaml & ounit & omake & ocsigenserver & ocp-index & ocp-indent & ocp-build & ocamlsdl & ocamlnet & ocamlmod & ocamlify & ocamlfind & ocaml-data-notation & oasis & lwt & leveldb & lablgtk & js%5fof%5focaml & imagemagick & fileutils & eliom & easy-format & deriving-ocsigen & csv & cryptokit & cppo & cmdliner & camlzip & calendar & biniou & base-unix & base-threads & base-bigarray & aws & aliases)
[8861] SOLVER               graph_of_actions root_actions={  - downgrade easy-format.192 to 190,  - downgrade lwt.298 to 293,  - downgrade yojson.205 to 194,  - downgrade re.210 to 209,  - downgrade ounit.203 to 202,  - downgrade lablgtk.302 to 301,  - recompile portola.185,  - downgrade type%5fconv.377 to 368,  - downgrade js%5fof%5focaml.225 to 222,  - downgrade eliom.323 to 321,  - downgrade ocsigenserver.285 to 284,  - downgrade typerex.266 to 265,  - downgrade xmlm.202 to 200,  - downgrade ocp-build.266 to 265,  - downgrade imagemagick.116 to 114,  - upgrade biniou.197 to 198 }
The following actions will be performed:
 - downgrade type_conv.109.15.00 to 109.07.00
 - downgrade imagemagick.0.34 to 0.33.1
 - downgrade xmlm.1.1.1 to 1.1.0
 - downgrade typerex.1.99.6-beta to 1.99.5-beta
 - downgrade easy-format.1.0.1.1 to 1.0.1
 - downgrade lwt.2.4.3 to 2.3.2 [required by eliom]
 - downgrade re.1.2.1 to 1.2.0
 - downgrade lablgtk.2.16.0 to 2.14.2-oasis8 [required by eliom]
 - recompile ocaml-data-notation.0.0.10 [use type_conv]
 - downgrade ocp-build.1.99.6-beta to 1.99.5-beta
 - upgrade biniou.1.0.5.1 to 1.0.6
 - downgrade js_of_ocaml.1.3.2+besport7 to 1.3.2+besport4 [required by eliom]
 - recompile ocamlnet.3.6.0 [use lablgtk]
 - recompile oasis.0.3.0 [use type_conv]
 - recompile ocp-indent.1.1.0 [use typerex]
 - recompile ocp-index.0.1.0 [use typerex]
 - downgrade yojson.1.1.3.1 to 1.0.3
 - recompile portola.1.0e [use lwt]
 - recompile tyxml.2.2.0+besport5 [use lablgtk]
 - downgrade ounit.1.1.2 to 1.1.1
 - downgrade ocsigenserver.2.2.0+besport3 to 2.2.0+besport2 [required by eliom]
 - recompile fileutils.0.4.4 [use type_conv]
 - recompile aws.0.0.2.2 [use easy-format, lablgtk, lwt, type_conv, xmlm]
 - downgrade eliom.3.1.0+besport10 to 3.1.0+besport8
0 to install | 9 to reinstall | 1 to upgrade | 14 to downgrade | 0 to remove
samoht commented 11 years ago

Which version of OPAM are you using ? This kind of downgrade issue happen when the "clever" heuristic fails to complete and fallback to "find the first possible solution". master contains a more clever heuristic, but the best one are implemented by external solver, available via apt-get install aspcud.

samoht commented 11 years ago

Given the debug message, I assume this is OPAM 1.0 (or older). The heuristic is clever in master and the message is clearer when we fallback to a degenerate solution. So closing the issue.