From 4354288e441473f4956c157896a9b2e6d2c5b488 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 17 Jul 2024 20:10:00 +0200 Subject: [PATCH] Run minimization of weights only on known targets (#45269) This prevents excessive output from clingo of the kind: .../spack/lib/spack/spack/solver/concretize.lp:1640:5-11: info: tuple ignored: #sup@2 --- lib/spack/spack/solver/concretize.lp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index b7acbdce21..836c76fe30 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -1128,8 +1128,11 @@ target_weight(Target, 0) node_target_weight(PackageNode, MinWeight) :- attr("node", PackageNode), attr("node_target", PackageNode, Target), + target(Target), MinWeight = #min { Weight : target_weight(Target, Weight) }. +:- attr("node_target", PackageNode, Target), not node_target_weight(PackageNode, _). + % compatibility rules for targets among nodes node_target_match(ParentNode, DependencyNode) :- attr("depends_on", ParentNode, DependencyNode, Type), Type != "build",