delta icon indicating copy to clipboard operation
delta copied to clipboard

Set MSRV to 1.64.0 in package metadata

Open nickelc opened this issue 2 years ago • 6 comments

clippy respects the rust version set in the package metadata and wouldn't break the build job for newer rust features.

The current clap version in use dictates 1.64.0.

nickelc avatar Mar 11 '23 06:03 nickelc

Hi @nickelc I trust your changes but would you mind spelling out for me exactly what problem this change is solving?

dandavison avatar Mar 11 '23 11:03 dandavison

First it documents the MSRV for readers and then it limits clippy to only issue warnings for lints that are compatible with the MSRV.

This reduces the possibility of a broken clippy build job and allows the version requirements to be changed deliberately.

For example, the #[derive(Default)] on enum (#1341) was stabilized with 1.62 and I just saw in another project that satisfying clippy bumped the project's MSRV from 1.56 to 1.62.

delta could also be checked against this MSRV with a CI job.

nickelc avatar Mar 11 '23 12:03 nickelc

delta could also be checked against this MSRV with a CI job.

This is how the CI job could look like. https://github.com/dandavison/delta/blob/2c48e356c8b5be5ddd0ca1b7a4e5b98f46f95bdd/.github/workflows/ci.yml#L111-L124

nickelc avatar Mar 11 '23 17:03 nickelc

How will I know when to update the MSRV?

dandavison avatar Apr 26 '23 15:04 dandavison

How will I know when to update the MSRV?

A build job would allow to check PRs against the MSRV https://github.com/dandavison/delta/pull/1343#issuecomment-1464964115 and then decide to deliberately bump the MSRV.

nickelc avatar Apr 26 '23 15:04 nickelc

It might well be my lack of familiarity with standard Rust practices but my worry is that this is more moving parts to maintain. When I'm in doubt I sometimes look at how bat and ripgrep do things, as examples of Rust CLI projects, so I'll try to do that.

dandavison avatar Jun 05 '23 13:06 dandavison