fix(cli): report real crate version in --version#64
Conversation
clap had the version hardcoded to "1.0", so `txio --version` disagreed with Cargo.toml (0.1.2) and the published crate. Use CARGO_PKG_VERSION so it always tracks the build. Closes #42
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR resolves the CLI version mismatch by updating the clap command metadata to use the Cargo package version macro. The hardcoded version string ChangesCLI Version Configuration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Summary
txio --versionprintedtxio 1.0because the clapversionwas hardcoded, disagreeing with the actual crate version (0.1.2in Cargo.toml) and the published crate.Changes
env!("CARGO_PKG_VERSION")for the clap command version in parser.rs so it always matches the build.Testing
cargo check -p txiopasses.Closes #42
Summary by CodeRabbit