concretizer: swap priority of selecting provider and default variant (#20182)
refers #20040 Before this PR optimization rules would have selected default providers at a higher priority than default variants. Here we swap this priority and we consider variants that are forced by any means (root spec or spec in depends_on clause) the same as if they were with a default value. This prevents the solver from avoiding expected configurations just because they contain directives like: depends_on('pkg+foo') and `+foo` is not the default variant value for pkg.
This commit is contained in:
committed by
Tamara Dahlgren
parent
96283867d6
commit
22d7937c50
@@ -0,0 +1,15 @@
|
||||
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
|
||||
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
||||
#
|
||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||
class DepWithVariants(Package):
|
||||
"""Package that has a variant which adds a dependency forced to
|
||||
use non default values.
|
||||
"""
|
||||
homepage = "https://dev.null"
|
||||
|
||||
version('1.0')
|
||||
|
||||
variant('foo', default=False, description='nope')
|
||||
variant('bar', default=False, description='nope')
|
||||
variant('baz', default=False, description='nope')
|
||||
Reference in New Issue
Block a user