-
Notifications
You must be signed in to change notification settings - Fork 282
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
Reformat apollo-router crate with rustfmt 2024 edition #6854
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: e8904def6b03cfe1ecabceea |
@SimonSapin, please consider creating a changeset entry in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a Rust expert but it make sense to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would propose that we:
- Add the commit from this PR (
10dfa657cc3ddcb356dbdbccd70e8c2741614ab8
) to.git-blame-ignore-revs
at the root of the repository sogit blame
usage is not impacted: https://docs.github.com/en/repositories/working-with-files/using-files/viewing-and-understanding-files#ignore-commits-in-the-blame-view - DON'T Squash this PR, but instead True-Merge.
As expected this has conflicts now so I’m gonna:
|
Starting with Rust 1.85, the language edition 2024 is available. With it also comes the [rustfmt style edition 2024](https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-style-edition.html), with several changes to code formatting such as import sorting. By default the style edition matches the language edition, but both can be configured separately. While we cannot use the new language edition yet in the apollo-router crate (GREsau/schemars#376), this PR changes to the new style edition. Aside from `apollo-router/rustfmt.toml` it is entirely generated by this command matching CI configuration: ``` cargo +nightly fmt -- --config imports_granularity=Item,group_imports=StdExternalCrate ``` (Unfortunately, import granularity and grouping config is still unstable in rustfmt.)
10dfa65
to
4db2bc0
Compare
Starting with Rust 1.85, the language edition 2024 is available. With it also comes the rustfmt style edition 2024, with several changes to code formatting such as import sorting. By default the style edition matches the language edition, but both can be configured separately. While we cannot use the new language edition yet in the apollo-router crate (GREsau/schemars#376), this PR changes to the new style edition. Aside from
apollo-router/rustfmt.toml
it is entirely generated by this command matching CI configuration:(Unfortunately, import granularity and grouping config is still unstable in rustfmt.)