-
Notifications
You must be signed in to change notification settings - Fork 115
Switch to nightly
rustfmt
#657
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
Switch to nightly
rustfmt
#657
Conversation
👋 I see @jkczyz was un-assigned. |
cf05abf
to
4effbe0
Compare
Now disabled comment wrapping and string formatting options (TBD if we want this eventually). Rest should be good to land, IMO. |
4effbe0
to
23217f0
Compare
🔔 1st Reminder Hey @jkczyz! This PR has been waiting for your review. |
23217f0
to
e4a0352
Compare
Rebased to address minor conflicts. |
@@ -0,0 +1,4 @@ | |||
[toolchain] |
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.
If I simply run cargo fmt
, isn't that supposed to just work?
~/repo/ldk-node (2025-10-switch-to-nightly-rustfmt ✔) cargo fmt
Warning: can't set `format_code_in_doc_comments = true`, unstable features are only available in nightly channel.
Warning: can't set `comment_width = 100`, unstable features are only available in nightly channel.
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 am worried now about IDE support
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.
Hmm, do you happen to have set an override for LDK Node? I.e., rustup override set XXX
? Otherwise it should indeed use what's inteh rust-toolchain.toml
.
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.
What happens in your case if you do:
?main ~/workspace/ldk-node> cargo fmt --version
rustfmt 1.8.0-stable (1159e78c47 2025-09-14)
?main ~/workspace/ldk-node> git checkout 2025-10-switch-to-nightly-rustfmt
Switched to branch '2025-10-switch-to-nightly-rustfmt'
Your branch is up to date with 'origin/2025-10-switch-to-nightly-rustfmt'.
?2025-10-switch-to-nightly-rustfmt ~/workspace/ldk-node> cargo fmt --version
rustfmt 1.8.0-nightly (f6aa851dba 2025-10-07)
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.
Ah, that was it indeed. Had been reproducing issues on older rust version with the override. All good then. Farewell to the import nits 😎
Just an experiment for now.