Skip to content

Switch to nightlyrustfmt - #657

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2025-10-switch-to-nightly-rustfmt
Oct 17, 2025
Merged

Switch to nightlyrustfmt#657
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2025-10-switch-to-nightly-rustfmt

Conversation

@tnull

@tnulltnull commented Oct 9, 2025

Copy link
Copy Markdown
Collaborator

Just an experiment for now.

@ldk-reviews-bot

ldk-reviews-bot commented Oct 9, 2025

Copy link
Copy Markdown

👋 I see @jkczyz was un-assigned.
If you'd like another reviewer assignment, please click here.

@tnull
tnull marked this pull request as draft October 9, 2025 12:17
@tnull
tnullforce-pushed the 2025-10-switch-to-nightly-rustfmt branch 2 times, most recently from cf05abf to 4effbe0CompareOctober 13, 2025 07:43
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

Now disabled comment wrapping and string formatting options (TBD if we want this eventually). Rest should be good to land, IMO.

@tnull
tnull marked this pull request as ready for review October 13, 2025 07:48
@tnull
tnullforce-pushed the 2025-10-switch-to-nightly-rustfmt branch from 4effbe0 to 23217f0CompareOctober 13, 2025 12:32
@ldk-reviews-bot

Copy link
Copy Markdown

🔔 1st Reminder

Hey @jkczyz! This PR has been waiting for your review.
Please take a look when you have a chance. If you're unable to review, please let us know so we can find another reviewer.

@tnull
tnullforce-pushed the 2025-10-switch-to-nightly-rustfmt branch from 23217f0 to e4a0352CompareOctober 16, 2025 12:39
@tnull

Copy link
Copy Markdown
CollaboratorAuthor

Rebased to address minor conflicts.

@tnull
tnull requested review from joostjager and removed request for jkczyzOctober 16, 2025 12:39
Comment threadrust-toolchain.toml
@@ -0,0 +1,4 @@
[toolchain]

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
CollaboratorAuthor

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.

Copy link
Copy Markdown
CollaboratorAuthor

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)

Copy link
Copy Markdown
Contributor

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 😎

@tnull
tnull merged commit da51546 into lightningdevkit:mainOct 17, 2025
14 of 15 checks passed
@tnulltnull mentioned this pull request Oct 17, 2025
Sign up for freeto 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.

3 participants

@tnull@ldk-reviews-bot@joostjager