Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
2 tasks done
borchero opened this issue Dec 18, 2024 · 1 comment
Open
2 tasks done
Labels
needs-design Needs a design so it can be implemented

Comments

@borchero
Copy link
Contributor

borchero commented Dec 18, 2024

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 👀

@ruben-arts
Copy link
Contributor

Great issue report!

This sounds like a reasonable extension of the solve-group feature. I would like to figure out where in the design this logic gets called, as I would also have expected it to skip the solve-group logic for the win-64 platform on env2.

@ruben-arts ruben-arts added the needs-design Needs a design so it can be implemented label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-design Needs a design so it can be implemented
Projects
None yet
Development

No branches or pull requests

2 participants