Skip to content

chore: lower published crate msrv to 1.91 - #1314

Merged
jdx merged 2 commits into
mainfrom
chore/lower-usage-msrv
Aug 25, 2026
Merged

jdx merged 2 commits into
mainfrom
chore/lower-usage-msrv

Conversation

@jdx

@jdx jdx commented Aug 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • lower usage-lib, usage-dynamic, clap_usage, and usage-cli from Rust 1.95 to 1.91
  • consolidate the MSRV matrix so every published crate is checked at Rust 1.91
  • keep the manifest-to-matrix guard that prevents the declared floor from drifting

Why

The 1.95 floor came from the external kdl dependency. The parser is now vendored and the published crates build successfully at the fleet's existing Rust 1.91 floor. This lets usage-cli install on runner images currently providing Rust 1.94.

A new usage release will be required before crates.io consumers receive the lower MSRV metadata.

Validation

  • all published crates: cargo +1.91 check --locked -p <crate> --all-features
  • cargo +1.91 install --path cli --locked
  • mise run lint
  • git diff --check

AI-assisted — Tool: Codex; model: openai/unavailable; version: unavailable.


Note

Low Risk
Mostly manifest and CI policy plus equivalent slice chunking; consumers need a new release for crates.io MSRV metadata, and dropping Windows clippy may reduce cfg-specific lint coverage unless intentional.

Overview
Lowers the published crates’ MSRV from 1.95 to 1.91 so metadata matches the fleet toolchain (e.g. usage-cli on runners with Rust 1.94). rust-version is updated in usage-lib, usage-dynamic, clap_usage, and usage-cli.

CI MSRV checks move from a split matrix (1.91 vs 1.95) to a single 1.91 row that runs cargo check on every published crate, with the existing manifest↔matrix guard kept so declared floors cannot drift.

KDL parsing for required_if_eq / required_if_eq_all pairs switches from chunks_exact(2) to as_chunks::<2>() in arg.rs and flag.rs as part of building cleanly at 1.91.

Workflow comments are updated to drop the old “KDL needs 1.95” story; conformance crate comment is tweaked to past tense. The diff also removes the Windows job’s mise r lint:clippy step while nearby comments still argue for platform-specific clippy there.

Reviewed by Cursor Bugbot for commit f9861e1. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Expanded compatibility to support Rust 1.91 across the project’s packages.
  • Chores

    • Updated automated validation to consistently check the Rust 1.91 minimum supported version.
    • Refined related version-floor documentation and comments.
    • Improved internal argument-pair processing without changing application behavior.

The KDL-backed crates needed Rust 1.95 only because kdl 6.7 declared that floor. Since the parser is now vendored, all published crates build at the fleet's Rust 1.91 MSRV.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 17765cb8-80a6-4246-a25b-965182b64ce7

📥 Commits

Reviewing files that changed from the base of the PR and between f7cf2f1 and f9861e1.

📒 Files selected for processing (2)
  • lib/src/spec/arg.rs
  • lib/src/spec/flag.rs

Included review availability: Your plan provides up to 4 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The change lowers five crate manifests from Rust 1.95 to 1.91, aligns the MSRV workflow with the shared floor, and uses fixed-size pair iteration in two parsing paths.

Changes

MSRV alignment

Layer / File(s) Summary
Lower crate version floors
clap_usage/Cargo.toml, cli/Cargo.toml, lib/Cargo.toml, usage-dynamic/Cargo.toml, conformance/Cargo.toml
Five manifests declare Rust 1.91 instead of 1.95. A related version comment is updated.
Align MSRV workflow checks
.github/workflows/test.yml
The workflow uses one Rust 1.91 matrix row, updates its documentation, and detects any manifest floor mismatch.
Use fixed-size pair iteration
lib/src/spec/arg.rs, lib/src/spec/flag.rs
Two parsing paths use as_chunks::<2>() instead of chunks_exact(2) for selector/value pairs. Pairing behavior remains unchanged.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to f9861

The change lowers the published MSRV and updates the corresponding checks without any actionable merge-blocking risk remaining after normal checks and review.

Poem

A rabbit checks the Rust floor,
Ninety-one guards every door.
Workflow rows now match the plan,
Pair chunks fit their arrays well.
Hop, hop—the checks align!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: lowering the published crates' MSRV to Rust 1.91.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
markdown ▄▄▆▆▇█▅▆▆▁▂▁▂▃▃▂▃ 336,861,274 → 337,877,640 +0.30% 28.87 → 38.44ms +33.16%
startup ▄▄▃▃▃▄▁▁▁▃▃▃▃████ 910,478 → 910,390 -0.01% 0.90 → 0.98ms +7.98%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

Shadow comparison

Parsing mise use -g node@20 against a shadow of mise's committed spec.
Reported, not gated: the shadow grows as the derive learns to express more, so
what to watch is the ratio rather than either column.

framework stripped binary, bytes
usage 1321264
bpaf 2493280
clap 3101832
framework instructions, cold parse vs usage
usage 8309 —
clap 6315228 760x
bpaf 21909141 2636x
                                              min       p01       p10    median
usage-rs: argv -> struct                      419       426       435       451  ns
clap: build tree + parse -> struct         554167    557090    572232    649566  ns
bpaf: build parser + parse -> struct      1668272   1668272   1678652   1705192  ns

usage: argv -> struct                             469 ns      0.47 µs
clap: build tree + parse -> struct             542528 ns    542.53 µs
clap: parse -> struct, tree reused              24632 ns     24.63 µs
clap: build tree only                          333266 ns    333.27 µs

f9861e17d091 vs 3d69594373f9 · measured on the runner, not pushed to the history.

@jdx
jdx enabled auto-merge (squash) August 25, 2026 15:00
@jdx
jdx merged commit 322b0b2 into main Aug 25, 2026
11 checks passed
@jdx
jdx deleted the chore/lower-usage-msrv branch August 25, 2026 15:14
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.

1 participant