Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump MSRV to 1.71.1 #1119

Merged
merged 35 commits into from
Mar 12, 2024
Merged

fix: bump MSRV to 1.71.1 #1119

merged 35 commits into from
Mar 12, 2024

Conversation

rnbguy
Copy link
Member

@rnbguy rnbguy commented Mar 9, 2024

Closes: #1118
Closes: #1101
Closes: #1120

Description

  • Increase MSRV to 1.71.1
  • Check MSRV on CI for linux and darwin
  • Update README with new links
  • Apply some clippy suggestions

PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests.
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@rnbguy rnbguy marked this pull request as ready for review March 9, 2024 10:46
Copy link

codecov bot commented Mar 9, 2024

Codecov Report

Attention: Patch coverage is 64.70588% with 78 lines in your changes are missing coverage. Please review.

Project coverage is 66.54%. Comparing base (e1f19af) to head (6161f2c).

Files Patch % Lines
ibc-apps/ics20-transfer/src/module.rs 9.09% 20 Missing ⚠️
ibc-apps/ics721-nft-transfer/src/module.rs 9.52% 19 Missing ⚠️
ibc-core/ics02-client/types/src/error.rs 0.00% 6 Missing ⚠️
...ics24-host/cosmos/src/upgrade_proposal/proposal.rs 0.00% 4 Missing ⚠️
ibc-clients/ics07-tendermint/types/src/error.rs 0.00% 3 Missing ⚠️
ibc-core/ics03-connection/types/src/error.rs 0.00% 3 Missing ⚠️
ibc-derive/src/client_state.rs 70.00% 3 Missing ⚠️
ibc-primitives/src/types/timestamp.rs 88.88% 3 Missing ⚠️
...stkit/src/testapp/ibc/clients/mock/client_state.rs 0.00% 3 Missing ⚠️
...ics07-tendermint/src/client_state/update_client.rs 88.88% 2 Missing ⚠️
... and 11 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1119      +/-   ##
==========================================
+ Coverage   66.51%   66.54%   +0.02%     
==========================================
  Files         209      209              
  Lines       20725    20617     -108     
==========================================
- Hits        13785    13719      -66     
+ Misses       6940     6898      -42     

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

@rnbguy rnbguy changed the title fix: bump msrv fix: bump MSRV to 1.71.1 Mar 9, 2024
@rnbguy rnbguy requested a review from Farhad-Shabani March 11, 2024 06:57
@rnbguy rnbguy marked this pull request as draft March 11, 2024 14:26
@rnbguy rnbguy marked this pull request as ready for review March 11, 2024 14:34
.github/workflows/rust.yml Show resolved Hide resolved
ibc-primitives/src/utils/macros.rs Show resolved Hide resolved
Comment on lines 141 to +142
max_clock_drift: Duration,
#[builder(default = Duration::from_secs(128000))]
#[builder(default = Duration::from_secs(128_000))]
Copy link
Member

@Farhad-Shabani Farhad-Shabani Mar 11, 2024

Choose a reason for hiding this comment

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

I liked the tidy outcome from clippy, however, couldn’t catch them on my machine. What version of clippy do you use? Did the CI detect these cases?

As for the particular case of the 128_000, it's strange that 64000 would be considered acceptable.

Copy link
Member Author

Choose a reason for hiding this comment

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

I cherry picked the lints after running all clippy lint groups. We shouldn't do this directly on CI (but probably locally for reviewing PRs is fine) - as most of them are very opinionated. But we can definitely add a bunch of them on CI.

Copy link
Member Author

@rnbguy rnbguy Mar 12, 2024

Choose a reason for hiding this comment

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

For the particular case, the lint case is called unreadable_literal. Looks like they warn this only when the decimal has 6 digits i.e. million.

Copy link
Member

Choose a reason for hiding this comment

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

Let's fix things when the linter catches them. That's alright.

@Farhad-Shabani Farhad-Shabani added this to the 0.51.0 milestone Mar 11, 2024
@rnbguy
Copy link
Member Author

rnbguy commented Mar 12, 2024

btw, I want to fix one more lint but the changes are too big. You can try it by running

cargo clippy --fix -- -W clippy::use_self

@Farhad-Shabani Farhad-Shabani merged commit b2c2529 into main Mar 12, 2024
17 checks passed
@Farhad-Shabani Farhad-Shabani deleted the rano/bump-msrv branch March 12, 2024 13:18
Farhad-Shabani added a commit that referenced this pull request Sep 9, 2024
* bump msrv to 1.71.1

* add ci check

* rm windows

* refactor msrv check

* use cargo-msrv

* add names to steps

* apply clippy suggestions

* rm redundant import

* clippy::use_self

* clippy::cast_lossless

* clippy::match_same_arms

* apply clippy suggestions

* reuse old var

* refactor old code

* badge for license, version, downloads

* rm broken tokei loc badge

* add changelog

* clippy::derive_partial_eq_without_eq

* clippy::string_lit_as_bytes

* clippy::empty_line_after_doc_comments

* clippy::cloned_instead_of_copied

* clippy::unreadable_literal

* clippy::single_match_else

* expect over unwrap

* use let-else

* use ok_or_else

* propagate None

* clippy::match_same_arms

* return precise error

* rm downcast in favor of let-else

* chore: add unclog for 1101 + move 1118 under breaking-changes

* add msrv in clippy config

* update changelog

* use into over from

* clippy::redundant_closure_for_method_calls

---------

Co-authored-by: Farhad Shabani <farhad.shabani@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants