Skip to content

fix(set-version): reject unmatched package selectors - #967

Merged
epage merged 2 commits into
killercup:masterfrom
ychampion:fix/set-version-missing-package
Jul 14, 2026
Merged

fix(set-version): reject unmatched package selectors#967
epage merged 2 commits into
killercup:masterfrom
ychampion:fix/set-version-missing-package

Conversation

@ychampion

Copy link
Copy Markdown
Contributor

Summary

  • reject explicit package selectors that do not match a workspace member
  • validate the complete selection before changing any manifests
  • cover single, mixed, multiple, and repeated missing selectors

Why

A nonexistent --package currently exits successfully without doing anything. Mixed valid and invalid selectors can also update part of a workspace before the mistake is noticed.

Closes #888.

Validation

  • cargo test --locked --all-features
  • cargo clippy --locked --all-targets --all-features -- -D warnings
  • cargo fmt --all -- --check
  • built cargo-set-version CLI smoke tests for missing and valid selectors

@ychampion
ychampion force-pushed the fix/set-version-missing-package branch from 50df9c8 to bf3582e Compare July 12, 2026 20:07
Comment thread tests/cargo-set-version/package_not_found/mod.rs Outdated
Comment thread tests/cargo-set-version/package_not_found/mod.rs
@ychampion
ychampion force-pushed the fix/set-version-missing-package branch from bf3582e to b91afe9 Compare July 14, 2026 14:41
@epage

epage commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

@epage
epage merged commit 24d89e7 into killercup:master Jul 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specifying nonexistent package name results in "successful" no-op run

2 participants