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

rust: 1.77.0 #10856

Merged
merged 8 commits into from
Mar 25, 2024
Merged

rust: 1.77.0 #10856

merged 8 commits into from
Mar 25, 2024

Conversation

mina86
Copy link
Contributor

@mina86 mina86 commented Mar 22, 2024

Release notes: https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html

With split_last_chunk bunch of stdx code can now be deleted. \o/

As for other changes:

  • Rust now doesn’t consider Clone and Debug derives as using fields of
    a type. This lead to a handful of dead_code warnings. I’ve fixed
    them by either removing offending type or adding allow(dead_code).

  • Cargo package id format has been stabilised¹ and krates crate
    stopped working. Why do we care about that crate? It’s a dependency
    of cargo-deny. To have CI pass I’ve updated taiki-e/install-action
    so that it fetches the newest cargo-deny.

¹ rust-lang/cargo#12914

Release notes: https://blog.rust-lang.org/2024/03/21/Rust-1.77.0.html

With split_last_chunk bunch of stdx code can now be deleted. \o/
@mina86 mina86 requested a review from a team as a code owner March 22, 2024 04:59
@mina86 mina86 requested a review from akhi3030 March 22, 2024 04:59
Copy link

codecov bot commented Mar 22, 2024

Codecov Report

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

Project coverage is 71.62%. Comparing base (69ba9f4) to head (8485598).

Files Patch % Lines
core/store/src/trie/mod.rs 0.00% 2 Missing ⚠️
chain/client/src/sync/external.rs 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10856      +/-   ##
==========================================
+ Coverage   71.39%   71.62%   +0.22%     
==========================================
  Files         764      758       -6     
  Lines      154001   151734    -2267     
  Branches   154001   151734    -2267     
==========================================
- Hits       109950   108672    -1278     
+ Misses      39046    38521     -525     
+ Partials     5005     4541     -464     
Flag Coverage Δ
backward-compatibility 0.24% <0.00%> (+<0.01%) ⬆️
db-migration 0.24% <0.00%> (+<0.01%) ⬆️
genesis-check 1.42% <6.25%> (+<0.01%) ⬆️
integration-tests 37.38% <66.66%> (+0.52%) ⬆️
linux 70.24% <83.33%> (+0.22%) ⬆️
linux-nightly 71.12% <83.33%> (+0.22%) ⬆️
macos 54.68% <58.82%> (+0.07%) ⬆️
pytests 1.65% <6.25%> (+<0.01%) ⬆️
sanity-checks 1.44% <6.25%> (+<0.01%) ⬆️
unittests 67.26% <61.11%> (+0.15%) ⬆️
upgradability 0.29% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -90,6 +90,7 @@ mod thunk;
///
/// This means that the module is invalid.
#[derive(Debug)]
#[allow(dead_code)]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Was this complaining about the field within the struct here (and elsewhere?) Is there a more granular lint we can allow than dead_code? Cause this I believe will keep this struct (or enum) around even after it becomes truly unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Complain here I guess. ;)

But yeah, I’m not happy with this either. The best I can think of is to declare a dummy function with allow(dead_code) which accesses those fields.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out types in chain/client/src/adapter.rs weren’t used and Clippy failed to detect that for some reason. Does derive marks type as used perhaps? In which case allow(dead_code) won’t prevent unused type detection.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Turns out types in chain/client/src/adapter.rs weren’t used and Clippy failed to detect that for some reason. Does derive marks type as used perhaps?

Might very well be some of the derives creating a use that's not obvious. e.g. maybe they put the type id into some sort of type registry?


Complain rust-lang/rust#85200 I guess. ;)

Ah, I see. I actually agree with the reasoning in the PR and would remove the field here.

@nagisa
Copy link
Collaborator

nagisa commented Mar 23, 2024

Looks like the cargo-deny check is failing…

@mina86
Copy link
Contributor Author

mina86 commented Mar 24, 2024

Yeah, that was next thing on my list. Had to update CI tools. Newer cargo-deny works fine.

@nagisa nagisa added this pull request to the merge queue Mar 25, 2024
Merged via the queue into near:master with commit 060016e Mar 25, 2024
30 of 31 checks passed
@mina86 mina86 deleted the a branch March 25, 2024 15:46
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