From 91e86f9d0d2d417486fbb95b519355667e0fbf2c Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Tue, 22 Dec 2020 10:28:47 +0100 Subject: concretizer: remove vestigial code and comment --- lib/spack/spack/solver/concretize.lp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index a68645c247..f62c9794a1 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -615,26 +615,6 @@ no_flags(Package, FlagType) %----------------------------------------------------------------------------- % How to optimize the spec (high to low priority) %----------------------------------------------------------------------------- -% weight root preferences higher -% -% TODO: how best to deal with this issue? It's not clear how best to -% weight all the constraints. Without this root preference, `spack solve -% hdf5` will pick mpich instead of openmpi, even if openmpi is the -% preferred provider, because openmpi has a version constraint on hwloc. -% It ends up choosing between settling for an old version of hwloc, or -% picking the second-best provider. This workaround weights root -% preferences higher so that hdf5's prefs are more important, but it's -% not clear this is a general solution. It would be nice to weight by -% distance to root, but that seems to slow down the solve a lot. -% -% One option is to make preferences hard constraints. Or maybe we need -% to look more closely at where a constraint came from and factor that -% into our weights. e.g., a non-default variant resulting from a version -% constraint counts like a version constraint. Needs more thought later. -% - -root(Package, 2) :- root(Package), node(Package). -root(Dependency, 1) :- not root(Dependency), node(Dependency). % The highest priority is to minimize the: % 1. Version weight -- cgit v1.2.3-60-g2f50