pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Feature request: pixi search - specific version

Open noamgot opened this issue 1 year ago • 6 comments

Problem description

One of the best features of pixi search is that it displays the package's dependencies, and it would be nice to examine older versions as well (not just the newest version).

Possible API proposals:

  1. pixi search package==version
  2. pixi search package --version <version> Both should be easily backward compatible (i.e, pixi search package should work the way it works today)

noamgot avatar Feb 20 '25 08:02 noamgot

I like it! I think we could also add a search based on the build number

nichtmacho avatar Feb 20 '25 09:02 nichtmacho

We should just accept a MatchSpec which covers all of this in a known easy to parse format.

ruben-arts avatar Feb 20 '25 13:02 ruben-arts

To explain my idea for potential contributors:

Normal use case

> pixi search rattler-build
Using channels: https://fast.prefix.dev/conda-forge/

rattler-build-0.35.9-h3ab7716_0
-------------------------------

Name                rattler-build      
Version             0.35.9
Build               h3ab7716_0         
Size                8642148            
License             BSD-3-Clause       
Subdir              osx-arm64          
File Name           rattler-build-0.35.9-h3ab7716_0.conda
URL                 https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.35.9-h3ab7716_0.conda
MD5                 e769b2c413ccef7f803bd89accd59a6a
SHA256              9495ca4e7259db1a816f3575295653ec1bc975c78d4b69d80ef3991402e95d6a

Dependencies:
 - __osx >=11.0

Other Versions (61):
Version  Build      
0.35.7   h3ab7716_0 
0.35.6   h3ab7716_0 
0.35.5   h3ab7716_0 
0.35.4   h3ab7716_0 
... and 57 more

Searching a specific version using a MatchSpec

pixi search "rattler-build<=0.35.4"
Using channels: https://fast.prefix.dev/conda-forge/

rattler-build-0.35.4-h3ab7716_0 
-------------------------------

Name                rattler-build      
Version             0.35.4
Build               h3ab7716_0         
Size                8612312           
License             BSD-3-Clause       
Subdir              osx-arm64          
File Name           rattler-build-0.35.4-h3ab7716_0 .conda
URL                 https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.35.4-h3ab7716_0 .conda
MD5                 123123123131231231233123a6a
SHA256              xxxx

Dependencies:
 - __osx >=11.0

Other Versions (61):
Version  Build      
0.35.4   h3ab7716_0 
0.35.3   h3ab7716_0 
0.35.2   h3ab7716_0 
0.35.1   h3ab7716_0 
... and 53 more
pixi search "rattler-build==0.35.4"
Using channels: https://fast.prefix.dev/conda-forge/

rattler-build-0.35.4-h3ab7716_0 
-------------------------------

Name                rattler-build      
Version             0.35.4
Build               h3ab7716_0         
Size                8612312           
License             BSD-3-Clause       
Subdir              osx-arm64          
File Name           rattler-build-0.35.4-h3ab7716_0 .conda
URL                 https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.35.4-h3ab7716_0 .conda
MD5                 123123123131231231233123a6a
SHA256              xxxx

Dependencies:
 - __osx >=11.0

Because of the MatchSpec you could also filter on build license SHA256

pixi search "rattler-build[build=h3ab7716_0]"
Using channels: https://fast.prefix.dev/conda-forge/

rattler-build-0.35.9-h3ab7716_0
-------------------------------

Name                rattler-build      
Version             0.35.9
Build               h3ab7716_0         
Size                8642148            
License             BSD-3-Clause       
Subdir              osx-arm64          
File Name           rattler-build-0.35.9-h3ab7716_0.conda
URL                 https://conda.anaconda.org/conda-forge/osx-arm64/rattler-build-0.35.9-h3ab7716_0.conda
MD5                 e769b2c413ccef7f803bd89accd59a6a
SHA256              9495ca4e7259db1a816f3575295653ec1bc975c78d4b69d80ef3991402e95d6a

Dependencies:
 - __osx >=11.0

Other Versions (61):
Version  Build      
0.35.7   h3ab7716_0 
0.35.6   h3ab7716_0 
0.35.5   h3ab7716_0 
0.35.4   h3ab7716_0 
... and 57 more

ruben-arts avatar Feb 24 '25 09:02 ruben-arts

@delsner and i want to implement this some time soon(ish)

pavelzw avatar Mar 24 '25 15:03 pavelzw

fixed by #3565

pavelzw avatar Jun 03 '25 15:06 pavelzw

@pavelzw thanks!

noamgot avatar Jun 03 '25 16:06 noamgot