Skip to content

fix(deps-cargo): sort crate search results by downloads#97

Merged
bug-ops merged 1 commit intomainfrom
fix/95-cargo-search-sort-downloads
Mar 28, 2026
Merged

fix(deps-cargo): sort crate search results by downloads#97
bug-ops merged 1 commit intomainfrom
fix/95-cargo-search-sort-downloads

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 28, 2026

Summary

  • crates.io default relevance sort prioritizes exact name matches over popular prefix matches
  • sql returned obscure crates, never sqlx; thiserr put thiserror at position 14
  • Adding sort=downloads to the search URL fixes both cases: sqlx is now 4th for sql, thiserror is 1st for thiserr

Resolves #95

Test plan

  • All existing tests pass (cargo nextest run --workspace --all-features)
  • Live: open Cargo.toml, type sqlsqlx appears in completions
  • Live: type thiserrthiserror appears at the top

crates.io default relevance sort prioritizes exact name matches, so
partial-prefix queries like 'sql' or 'thiserr' returned obscure crates
instead of sqlx/thiserror. Adding sort=downloads to the search URL
ensures popular crates surface at the top of completions.

Resolves #95
@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes needs-review Needs review size: XS <10 lines changed labels Mar 28, 2026
@bug-ops bug-ops enabled auto-merge (squash) March 28, 2026 22:39
@bug-ops bug-ops merged commit 9f6b374 into main Mar 28, 2026
20 checks passed
@bug-ops bug-ops deleted the fix/95-cargo-search-sort-downloads branch March 28, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation needs-review Needs review rust Rust code changes size: XS <10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the crate name autoxompletion doesnt work reliabely

1 participant