From 7e1890772cfbe1ecbf26c2a874ab95ac2d4eeef6 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 16 Aug 2022 12:47:05 -0700 Subject: bugfix: silence `clingo` warning about `requirement_policy/3` `requirement_policy/3` is generated and may not be in Spack's inputs to Clingo. Currently this is causing warnings like: ``` $ spack spec zlib /global/u2/t/tgamblin/src/spack/lib/spack/spack/solver/concretize.lp:510:3-43: info: atom does not occur in any rule head: requirement_policy(Package,X,"one_of") /global/u2/t/tgamblin/src/spack/lib/spack/spack/solver/concretize.lp:517:3-43: info: atom does not occur in any rule head: requirement_policy(Package,X,"one_of") /global/u2/t/tgamblin/src/spack/lib/spack/spack/solver/concretize.lp:523:3-43: info: atom does not occur in any rule head: requirement_policy(Package,X,"any_of") /global/u2/t/tgamblin/src/spack/lib/spack/spack/solver/concretize.lp:534:3-43: info: atom does not occur in any rule head: requirement_policy(Package,X,"any_of") Input spec -------------------------------- zlib Concretized -------------------------------- zlib@1.2.11%gcc@7.5.0+optimize+pic+shared arch=cray-sles15-haswell ``` - [x] Silence warning with `#defined requirement_policy/3` --- lib/spack/spack/solver/concretize.lp | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/spack/spack/solver/concretize.lp b/lib/spack/spack/solver/concretize.lp index 3a497c1d3b..48cb0f1d36 100644 --- a/lib/spack/spack/solver/concretize.lp +++ b/lib/spack/spack/solver/concretize.lp @@ -542,6 +542,7 @@ error(2, "Cannot satisfy requirement group for package '{0}'", Package) :- #defined requirement_group/2. #defined requirement_group_member/3. #defined requirement_has_weight/2. +#defined requirement_policy/3. %----------------------------------------------------------------------------- % Variant semantics -- cgit v1.2.3-70-g09d2