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

pixi search pyqt returns incorrect version/python version build #970

Closed
2 tasks done
synapticarbors opened this issue Mar 13, 2024 · 4 comments
Closed
2 tasks done
Labels
🐞 bug Something isn't working

Comments

@synapticarbors
Copy link
Contributor

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

❯ pixi --version
pixi 0.16.1
❯ pixi search pyqt

pyqt py39h3dce684_5
-------------------

Name                pyqt
Version             5.15.9
Build               py39h3dce684_5
Size                4067571
License             GPL-3.0-only
Subdir              osx-64
File Name           pyqt-5.15.9-py39h3dce684_5.conda
URL                 https://conda.anaconda.org/conda-forge/osx-64/pyqt-5.15.9-py39h3dce684_5.conda
MD5                 ecc396e7a7badba032c3f9dd30c40e9c
SHA256              58e3f096357bc899fa446bc9ff28cf04feaa3cb7b394b2fcf7e4facce442ff72

Dependencies:
 - libcxx >=15.0.7
 - pyqt5-sip 12.12.2 py39hb11a7c1_5
 - python >=3.9,<3.10.0a0
 - python_abi 3.9.* *_cp39
 - qt-main >=5.15.8,<5.16.0a0
 - sip >=6.7.11,<6.8.0a0

Issue description

pixi search pyqt returns the correct major version, but shows the dependencies/build for an older version of python.
In the above, it's showing the build for python3.9. Running pixi add python pyqt on a clean project, gets the build for the latest python3.12 as expected (inspecting the pixi.lock file).

This seems similar but not exactly the same as #712, and might be confusing because it looks like pyqt isn't built for the latest version of python.

Expected behavior

I would expect pixi search (given the help description of "Search a package, output will list the latest version of package"), to give me the latest build, or the latest build consistent with the dependencies already specified in the project.

@synapticarbors synapticarbors added the 🐞 bug Something isn't working label Mar 13, 2024
@chawyehsu
Copy link
Contributor

Confirmed. Now there should be a codebase refactor to abstract logic of how pixi add determine and add packages and share it with pixi search to eliminate package solving differences between these two commands.

@wolfv
Copy link
Member

wolfv commented Mar 16, 2024

I am not sure if properly "solving" would be the correct solution since users expect search to return any available versions (not only the ones that would resolve properly).

However, we should use the same comparison functions that we use for determining the best package (the package we try first when solving). This is implemented in rattler, in the conda_util.rs file. Unfortunately that is not easily re-useable outside of the solver.

In the meantime we could also print all available variants of a package version and do some other (maybe simpler) comparison operation.

@ruben-arts
Copy link
Contributor

This issue also requests a more verbose output of pixi search #869

@ruben-arts
Copy link
Contributor

It should now work for at request in the title:

❯ pixi search pyqt
Using channels: https://fast.prefix.dev/conda-forge/, bioconda

pyqt py312h949fe66_5
--------------------

Name                pyqt               
Version             5.15.9
Build               py312h949fe66_5    
Size                5263946            
License             GPL-3.0-only       
Subdir              linux-64           
File Name           pyqt-5.15.9-py312h949fe66_5.conda
URL                 https://conda.anaconda.org/conda-forge/linux-64/pyqt-5.15.9-py312h949fe66_5.conda
MD5                 f6548a564e2d01b2a42020259503945b
SHA256              22ccc59c03872fc680be597a1783d2c77e6b2d16953e2ec67df91f073820bebe

Dependencies:
 - libgcc-ng >=12
 - libstdcxx-ng >=12
 - pyqt5-sip 12.12.2 py312h30efb56_5
 - python >=3.12.0rc3,<3.13.0a0
 - python_abi 3.12.* *_cp312
 - qt-main >=5.15.8,<5.16.0a0
 - sip >=6.7.11,<6.8.0a0

Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants