Gilles Scokart a écrit :
> An Ivy like function might be nice as well.;-) But there is a piece
> that I miss. How did you handle conlicts? I means not multiple
> possible solution, but real conflicts. This seems to be incompatible
> with a strtict system of constraints.
>
> If I take the example :
> A depends on B:1 and C:1
> B:1 depends on C:2.
>
> I think maven will take C:1 (first levle in the dependency tree), Ivy
> would by default take C:2 (because it resolve conflicts by taking the
> 'latest' version). What will mercury do? My understanding is that
> the SAT resolution will say there is no solution. What practical
> solution do you propose for Mercury users? Do you ask them to fill a
> DependencyManagment section for the the module that are in conflicts ?
>From a pure logical point of view, there is no solution to that system
if you add the constraints that you would like to install A and that C:1
and C:2 cannot be installed together.
Now, since there is an optimization function, it is possible to encode
conflicts in the constraints:
A depends on (B:1 or ConflictB) and (C:1 or ConflictC)
B:1 depends on (C:2 or ConflictC)
And minimize the sum of conflicts in the optimization function.
With the optimization function provided earlier by Oleg, the selection
between C:1 and C:2 would be C:2, because it prefers latest versions,
like Ivy.
Daniel
--
Daniel Le Berre mailto:[email protected]
MCF, CRIL-CNRS UMR 8188, Universite d'Artois
http://www.cril.univ-artois.fr/~leberre
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]