rust-libp2p icon indicating copy to clipboard operation
rust-libp2p copied to clipboard

chore(*): Run rustfmt 1.7.0 and clippy 0.1.76

Open umgefahren opened this issue 1 year ago • 6 comments

Description

Ran cargo fmt and cargo clippy --fix with the respective new nightly versions.

Notes & open questions

While I have no issues with the fixes introduced by clippy, I have issues with the new rustfmt version.

As you can see the changes are quite severe and the change in style is stronger then in previous releases.

We should be careful when merging into master, because every PR that doesn't use the nightly compiler and runs the format will probably have a merge conflict. But we probably have to do it eventually.

An upside of the changes, at least from my POV is that changes are now spread over more lines, which could be beneficial for merge conflict resolution.

I would suggest we keep this PR open and I update it regularly with the nightly versions of rustfmt. It's a lot of work to merge that probably, so I'd suggest we merge the version that will be released eventually.

Change checklist

  • [ ] I have performed a self-review of my own code

umgefahren avatar Nov 20 '23 15:11 umgefahren

This single PR is so massive, it would probably be my biggest contribution (in the stats) by far, which is... interesting.

umgefahren avatar Nov 20 '23 15:11 umgefahren

I have issues with the new rustfmt version.

Me too and I am somewhat surprised that the Rust team would ship that!

While I have no issues with the fixes introduced by clippy

Can you extract that into a separate PR (and bump the nightly clippy version in CI). We will update to clippy once 1.75 is stable so we might as well fix those lints early.

thomaseizinger avatar Nov 20 '23 21:11 thomaseizinger

This pull request has merge conflicts. Could you please resolve them @umgefahren? 🙏

mergify[bot] avatar Nov 21 '23 00:11 mergify[bot]

I have issues with the new rustfmt version.

Me too and I am somewhat surprised that the Rust team would ship that!

Should we open an issue with them, if there isn't one already?

While I have no issues with the fixes introduced by clippy

Can you extract that into a separate PR (and bump the nightly clippy version in CI). We will update to clippy once 1.75 is stable so we might as well fix those lints early.

Will do, some of the remaining lints need manual fixing though and will introduce breaking changes in public APIs.

umgefahren avatar Nov 24 '23 14:11 umgefahren

I have issues with the new rustfmt version.

Me too and I am somewhat surprised that the Rust team would ship that!

Should we open an issue with them, if there isn't one already?

I think it may come as part of the next edition which would allow for such changes to be made AFAIK.

I have issues with the new rustfmt version.

Me too and I am somewhat surprised that the Rust team would ship that!

Should we open an issue with them, if there isn't one already?

While I have no issues with the fixes introduced by clippy

Can you extract that into a separate PR (and bump the nightly clippy version in CI). We will update to clippy once 1.75 is stable so we might as well fix those lints early.

Will do, some of the remaining lints need manual fixing though and will introduce breaking changes in public APIs.

Happy to merge the easy ones first and hold off on all the breaking ones until we do another release.

thomaseizinger avatar Nov 27 '23 05:11 thomaseizinger

This pull request has merge conflicts. Could you please resolve them @umgefahren? 🙏

mergify[bot] avatar Apr 15 '24 09:04 mergify[bot]

closing as stale

jxs avatar Jun 13 '24 10:06 jxs