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

chore: fix format with nightly #5742

Merged
merged 1 commit into from
Dec 15, 2024
Merged

Conversation

elenaf9
Copy link
Contributor

@elenaf9 elenaf9 commented Dec 14, 2024

Description

Fix formatting with nightly.

Without nightly, some of our rustfmt.toml rules aren't applied because they are not stable yet (e.g. our group_imports rule).
Our CI didn't catch it yet because it doesn't check fmt on nightly. Will fix that in a follow-up PR.

Notes & open questions

Came up in #5725 (comment).

cc @drHuangMHT you were actually correct in #5726 (comment), the items are reordered across blocks because of our rule group_imports = "StdExternalCrate")

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@elenaf9 elenaf9 mentioned this pull request Dec 14, 2024
4 tasks
@kamuik16
Copy link
Contributor

Description

Fix formatting with nightly.

Without nightly, some of our rustfmt.toml rules aren't applied because they are not stable yet (e.g. our group_imports rule).
Our CI didn't catch it yet because it doesn't check fmt on nightly. Will fix that in a follow-up PR.

Notes & open questions

Came up in #5725 (comment).

cc @drHuangMHT you were actually correct in #5726 (comment), the items are reordered across blocks because of our rule group_imports = "StdExternalCrate")

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

Can we also fix the fmt workflow to use the nightly feature on the cargo fmt check?

@elenaf9
Copy link
Contributor Author

elenaf9 commented Dec 14, 2024

Can we also fix the fmt workflow to use the nightly feature on the cargo fmt check?

Already opened #5743 :)

Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

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

Thanks Elena!

cc @drHuangMHT you were actually correct in #5726 (comment), the items are reordered across blocks because of our rule group_imports = "StdExternalCrate")

Auch I didn't notice that, if you prefer we can switch to another option

@jxs jxs added the send-it label Dec 15, 2024
@mergify mergify bot merged commit 577036a into libp2p:master Dec 15, 2024
71 checks passed
@elenaf9 elenaf9 deleted the fmt/fix-nightly-fmt branch December 16, 2024 08:59
@elenaf9
Copy link
Contributor Author

elenaf9 commented Dec 16, 2024

HImm unfortunately there's no option that groups std/external/crate and private/ public, so I am okay with sticking with the current one.

jxs pushed a commit to jxs/rust-libp2p that referenced this pull request Jan 6, 2025
Fix formatting with nightly.

Without nightly, some of our `rustfmt.toml` rules aren't applied because they are not stable yet (e.g. our `group_imports` rule).
Our CI didn't catch it yet because it doesn't check fmt on nightly. Will fix that in a follow-up PR.

Pull-Request: libp2p#5742.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants