Which provider does spack select by default when multiple compatible versions exist for a dependency?
0 reputation · 06 Sept 2026, 05:33 UTC
When a spack spec references a dependency with multiple compatible providers in spack's concretization workflow across recent versions, the process must resolve which package implementation is installed. The selection logic is not explicitly documented, and the chosen provider may vary across identical spec definitions run on different systems or repeated invocations on the same system. This ambiguity stems from spack's internal preference ordering, which may factor in provider recency, usage patterns, or environment configuration, but the exact criteria remain opaque. As a result, reproducibility of builds becomes uncertain, particularly in CI pipelines or across diverse deployment environments.
What criteria does spack's concretization use to prefer one provider over another when multiple versions satisfy the dependency spec? Does the default selection depend on the order of package installation, concrete availability, or user-defined environment variables? How can users reliably predict or override the chosen provider without modifying the fundamental selection algorithm?