Skip to content

Environments with different platforms fail to solve in the same solve group #2725

@borchero

Description

@borchero

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

[project]
channels = ["conda-forge"]
name = "pixitest"
platforms = ["linux-64", "osx-arm64", "win-64"]

[dependencies]
numpy = "*"

[feature.feat1]
platforms = ["linux-64", "osx-arm64"]
[feature.feat1.dependencies]
kubernetes-kind = "*"

[environments]
env1 = { solve-group = "prod" }
env2 = { features = ["feat1"], solve-group = "prod" }

Issue description

When trying to run a solve where

  • There are >=2 environments with the same solve group AND
  • A strict subset of the environments reference a feature whose platforms is a strict subset of the project's platforms AND
  • At least one dependency in this feature is not available for all of the project's platforms

the solve fails. For the MWE above, it fails with the following message:

  × failed to solve the conda requirements of 'prod' 'win-64'
  ╰─▶ Cannot solve the request because of: No candidates were found for kubernetes-kind *.

Expected behavior

The solve should be successful with:

  • env1 containing numpy for linux-64, osx-arm64 and win-64
  • env2 containing numpy and kubernetes-kind for linux-64 and osx-arm64

NOTE: The solve is successful when first removing the solve group and running pixi install, then re-running pixi install after re-introducing the solve group 👀

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew featuresneeds-designNeeds a design so it can be implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions