Skip to content
New issue

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

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

Already on GitHub? # to your account

solving package dependency from multiple channels #3068

Open
2 tasks done
noamgot opened this issue Feb 5, 2025 · 1 comment
Open
2 tasks done

solving package dependency from multiple channels #3068

noamgot opened this issue Feb 5, 2025 · 1 comment

Comments

@noamgot
Copy link
Contributor

noamgot commented Feb 5, 2025

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

Problem Description

I have the following pixi.toml configuration

[project]
channels = [
  "conda-forge"
  "org-internal-channel",
]
  • I want to add an internal package - let's call it internal-package. This package depends on another internal package (located on org-internal-channel) called another-package. The dependency is for version >=2.
  • Unfortunately, another-package is also a package on conda-forge (some open source implementation) and has multiple versions, all <1.0.0.
    When I run:
pixi add internal-package

it fails with this error:

Error: 
  × failed to fetch another-package-0.81.1-hede6621_0.conda
  ╰─▶ HTTP status client error (404 Not Found) for url (https://***/api/conda/conda-forge/noarch/another-package-0.81.1-hede6621_0.conda)

However, when I explicitly tells it to install another-package>=2 it works:

pixi add internal-package "another-package>=2"

Issue description

Notes

There are 2 more additional solutions:

  1. settings channel-priority = "disabled" works, but according to the docs it's not recommended.
  2. instead of defining the version (>=2), explicitly installing from the internal channel:
pixi add internal-package org-internal-package::another-package

Conclusion

Despite the solutions I introduced, it looks like a bug to me - if pixi can solve it when providing an explicit version, I'd expect it to solve it even when it's provided implicitly (as a dependency of internal-package).
* could be related - I found this discussion about flexible channel priorty #1254 - looks like it's implemented on ratller's side (and the described behavior implies that some flexibility is applied - otherwise, when I added "another-package>=2", strict channel priority would make it crash, wouldn't it?)

I'd like to hear your thoughts about it.

Expected behavior

I'd expect a more consistent behavior - either make

pixi add internal-package

pass, or make:

pixi add internal-package "another-package>=2"

fail :)

@baszalmstra
Copy link
Contributor

That indeed sounds like a bug! Thanks for reporting! We’ll look into it!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants