feat: pixi search improvements: allow arbitrary MatchSpecs, add --json#5442
feat: pixi search improvements: allow arbitrary MatchSpecs, add --json#5442ruben-arts merged 39 commits intoprefix-dev:mainfrom
pixi search improvements: allow arbitrary MatchSpecs, add --json#5442Conversation
Replace manual wildcard handling in `pixi search` with rattler's new glob matchspec support via `ParseStrictnessWithNameMatcher`. Changes: - Consolidate `search_exact()` and `search_wildcard()` into single `search()` function that handles both exact and glob patterns - Remove regex conversion and fuzzy search (jaro similarity) fallback - Add `-n/--limit-packages` flag to control detailed output count (default: 3 packages show full info, rest show compact table) - Gateway now handles glob matching internally - no more manual `gateway.names()` + filtering - Results sorted alphabetically by package name Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This reverts commit 229815d.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pixi search improvements: allow arbitrary MatchSpecs, add --json
crates/pixi_cli/src/search.rs
Outdated
| /// The platform(s) to search for | ||
| #[arg(short, long, default_values_t = [Platform::current(), Platform::NoArch])] | ||
| pub platform: Vec<Platform>, |
There was a problem hiding this comment.
this is slightly different api than the rest of pixi but can express more. any opinions on this? alternatively we could also only add --all-platforms and fall back to platform being vec![platform, Platform::NoArch]
There was a problem hiding this comment.
Does it really change anything for the normal usage? I though it would start expecting --platform linux-64 osx-64 but it still expects one value per flag, so I guess it's good.
There was a problem hiding this comment.
"Normal usage" might be -p linux-64 which would After this pr not include noarch. This might be unexpected in some scenarios
| "ISC", | ||
| "MIT", | ||
| "MPL-2.0", | ||
| "OpenSSL", |
There was a problem hiding this comment.
parts of the codebase now use aws-smithy-http-client which uses aws-lc-sys which apparently has the openssl license
❯ cargo tree -i aws-lc-sys
aws-lc-sys v0.37.1
└── aws-lc-rs v1.16.0
├── rustls v0.23.36
│ ├── aws-smithy-http-client v1.1.9
│ │ ├── rattler_networking v0.26.1
since reqwest 0.13 will require this anyway(?) i think this is fine
ruben-arts
left a comment
There was a problem hiding this comment.
Love the change! Next step is a smarter result where it does an automatic * addition to the string if it doens't find anything ;)
I believe rattler was released such that you can update it in Pixi.
crates/pixi_cli/src/search.rs
Outdated
| /// The platform(s) to search for | ||
| #[arg(short, long, default_values_t = [Platform::current(), Platform::NoArch])] | ||
| pub platform: Vec<Platform>, |
There was a problem hiding this comment.
Does it really change anything for the normal usage? I though it would start expecting --platform linux-64 osx-64 but it still expects one value per flag, so I guess it's good.
crates/pixi_cli/src/search.rs
Outdated
| return Err(e).into_diagnostic(); | ||
| } | ||
| // Resolve platforms | ||
| let platforms = if args.all_platforms { |
There was a problem hiding this comment.
Reading this I feel this could be even more agressive.
Why not use workspace.platforms always and only sort for the specific platforms if requested or outside of the workspace. --all-platforms sounds to me that it would go beyond the given platforms and search with all the exotic stuff rattler already knows.
There was a problem hiding this comment.
Also works for me 👍🏻
There was a problem hiding this comment.
okay let's remove --all-platforms (make it default) and make platforms an Option<Platform>
There was a problem hiding this comment.
|
i updated the rattler crates again and rattler-build |
ruben-arts
left a comment
There was a problem hiding this comment.
Great feature! Thanks
Bildschirmaufnahme.2026-02-20.um.15.26.29.mov
closes #378, depends on conda/rattler#2036
this concludes all my wishes for
pixi search. all other things likemicromamba repoqueryi would rather put in https://github.com/pavelzw/pixi-browseHow Has This Been Tested?
AI Disclosure
Tools: claude + codex
Checklist:
schema/model.py.