Skip to content

add MSRV - #242

Open
danieleades wants to merge 1 commit into
get-eventually:mainfrom
danieleades:msrv
Open

add MSRV#242
danieleades wants to merge 1 commit into
get-eventually:mainfrom
danieleades:msrv

Conversation

@danieleades

Copy link
Copy Markdown
Contributor

adds an MSRV check to CI

this check ensures that changes to dependencies or syntax in this repo don't inadvertently force downstream users to bump their compiler versions.

the clippy msrv config also prevents clippy from suggesting changes that are not supported by the MSRV toolchain

An MSRV bump should be a patch change before 1.0.0, and a minor change afterwards

@codecov

codecovBot commented Dec 1, 2022

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.60%. Comparing base (8ca80dd) to head (9c344b5).
⚠️ Report is 37 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #242 +/- ##
=======================================
Coverage 78.60% 78.60% =======================================
Files 18 18 Lines 589 589 =======================================
Hits 463 463 Misses 126 126 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@danieleadesdanieleades mentioned this pull request Dec 1, 2022

@iitsdaniiitsdani left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mind adding MSRV once again, but only if there is a pain-free way to "infer" it.
Is there any official documentation on how to do it?

I tried some time ago, the only tool I found was https://github.com/foresterre/cargo-msrv, which is gloriously failing on my dev machine since it uses rustup and I can't use that (NixOS machine).

If it's something I can't maintain, I'd rather not specify it honestly and just target latest stable always.
I know that's not the nicest stance to take, but better than a broken experience 🤷🏻‍♂️

@danieleades

Copy link
Copy Markdown
ContributorAuthor

I wouldn't mind adding MSRV once again, but only if there is a pain-free way to "infer" it. Is there any official documentation on how to do it?

I tried some time ago, the only tool I found was https://github.com/foresterre/cargo-msrv, which is gloriously failing on my dev machine since it uses rustup and I can't use that (NixOS machine).

I use cargo-msrv, which is pretty straightforward on my machine. Have you tried raising a ticket against the project for NixOS support?

It looks like some work has been done here already, so it may Just Work for you

If it's something I can't maintain, I'd rather not specify it honestly and just target latest stable always. I know that's not the nicest stance to take, but better than a broken experience 🤷🏻‍♂️

depends what you mean by 'stable'. For example using variables directly inside format strings was just stabilised, so you can now do

format!("key: {value}");

instead of

format!("key: {}", value);

But if you were to switch to that syntax the moment it was available, you'd break the build for any downstream users that weren't using the very latest stable compiler. Adding an MSRV target gives you a way to tell if you've potentially just broken other people's builds with a PR.

@iitsdani

Copy link
Copy Markdown
Collaborator

Hey @danieleades 👋🏻

Going back to this PR.
How would you feel about adding an Action step to calculate the latest MSRV on the Github Actions runner? 👀

Might be easier in terms of maintenance, and I would be more than willing to add an MSRV version then 👌🏻

Sign up for freeto 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

@danieleades@iitsdani