Skip to content

Support clap long version#897

Open
tisonkun wants to merge 1 commit intomitsuhiko:masterfrom
tisonkun:clap-long-version
Open

Support clap long version#897
tisonkun wants to merge 1 commit intomitsuhiko:masterfrom
tisonkun:clap-long-version

Conversation

@tisonkun
Copy link
Copy Markdown
Contributor

cc @max-sixty

$ cargo run --bin cargo-insta -- --version
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.04s
     Running `target/debug/cargo-insta --version`
cargo-insta 1.47.2
branch:clap-long-version
commit_hash:0843c8c
build_time:2026-04-16 06:42:35 +08:00
build_env:rustc 1.96.0-nightly (38c0de8dc 2026-02-28),nightly-aarch64-apple-darwin

When debugging #868, I noticed that a long version info with commit_hash helps or else I got only cargo-insta 1.46.3 where I'm unsure if the used tool is from a local build.

Note that the branch and commit fields are empty if installed via cargo install cargo-insta because the published crate has no .git info. But that should be fine.

Signed-off-by: tison <wander4096@gmail.com>
@max-sixty
Copy link
Copy Markdown
Collaborator

thanks @tisonkun !

do we need a whole new dependency for this? we would need to resolve the MSRV issue...

@tisonkun
Copy link
Copy Markdown
Contributor Author

tisonkun commented Apr 16, 2026

@max-sixty I was also noticing this after seeing the CI failure.

I'm not quite sure about MSRV. Because cargo-insta is a binary rather than a software library that needs to be depended upon. Consequently, I'm unclear on this project's MSRV policy.

I decided to leave it as is for now, but we do need to bump the MSRV to accept this PR.

@tisonkun
Copy link
Copy Markdown
Contributor Author

Seems not shadow-rs's issue but time's issue that used in build-dependencies.

Let me see if I can relax the MSRV requirement.

@tisonkun
Copy link
Copy Markdown
Contributor Author

tisonkun commented Apr 16, 2026

I'm going to see if shadow-rs can depend on jiff but it also requires MSRV >= 1.70.0, while cargo-insta has MSRV=1.66.0.

Pin time can't work because shadow-rs requires time >= 0.3.47 while only time <= 0.3.23 fits MSRV <= 1.66.0.

Ref - baoyachi/shadow-rs#259

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.

2 participants