Skip to content

fix(deps-bundler): handle wildcard in version_matches_requirement#92

Merged
bug-ops merged 1 commit intomainfrom
89-bundler-wildcard-version
Mar 28, 2026
Merged

fix(deps-bundler): handle wildcard in version_matches_requirement#92
bug-ops merged 1 commit intomainfrom
89-bundler-wildcard-version

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

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

Summary

  • version_matches_requirement in crates/deps-bundler/src/version.rs did not handle the "*" wildcard requirement
  • Background registry fetch calls get_latest_matching(name, "*") for each Gemfile dependency; without wildcard support it always returned None
  • This left cached_versions empty, causing generate_inlay_hints to produce zero results

Fix

Added a wildcard guard at the top of version_matches_requirement:

if req == "*" {
    return true;
}

Added three test cases covering wildcard behavior.

Test plan

  • cargo +nightly fmt --all -- --check passed
  • cargo clippy --workspace --all-targets --all-features -- -D warnings passed
  • cargo nextest run --workspace --all-features --no-fail-fast — 1314 passed, 37 skipped

Closes #89

@github-actions github-actions Bot added documentation Improvements or additions to documentation rust Rust code changes needs-review Needs review size: S 10-50 lines changed labels Mar 28, 2026
@bug-ops bug-ops force-pushed the 89-bundler-wildcard-version branch from 5d763b1 to f66a282 Compare March 28, 2026 21:25
@bug-ops bug-ops enabled auto-merge (squash) March 28, 2026 21:26
version_matches_requirement did not handle the "*" wildcard requirement,
causing get_latest_matching to always return None. This left cached_versions
empty and made inlay hints produce zero results for all Gemfile dependencies.

Fixes #89
@bug-ops bug-ops force-pushed the 89-bundler-wildcard-version branch from f66a282 to fd918cb Compare March 28, 2026 21:34
@bug-ops bug-ops merged commit 92a0e3a into main Mar 28, 2026
20 checks passed
@bug-ops bug-ops deleted the 89-bundler-wildcard-version branch March 28, 2026 21: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: S 10-50 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(deps-bundler): inlay hints always empty — version_matches_requirement does not handle wildcard

1 participant