Skip to content

Skip formatting for descriptor macro - #663

Open
nymius wants to merge 1 commit into
bitcoindevkit:release/3.xfrom
nymius:push-olrvytzpolwl
Open

nymius wants to merge 1 commit into
bitcoindevkit:release/3.xfrom
nymius:push-olrvytzpolwl

Conversation

@nymius

@nymius nymius commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

While reviewing #626, when running just pre-push the checks were failing due to fmt in the latest +nightly toolchain adding an extra comma to the output script descriptor inside the descriptor!, which broke the macro.

This change skips formatting for the affected macro calls so just pre-push works fine.

The nightly tool-chain used is:

$ cargo +nightly --version
cargo 1.101.0-nightly (29c5daa1a 2026-10-07)

When running `just pre-push` the checks where failing due to fmt in the
latest +nightly toolchain adding an extra comma to the output script
descriptor inside the `descriptor!`, which broke the macro.

This change skips formatting for the affected macro calls so `just
pre-push` works fine.
@nymius
nymius requested a review from a team as a code owner November 24, 2026 19:08
@github-project-automation github-project-automation Bot moved this to Triage in BDK Wallet Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.32%. Comparing base (b1cb12d) to head (c03c3c2).

Additional details and impacted files
@@               Coverage Diff               @@
##           release/3.x     #663      +/-   ##
===============================================
- Coverage        82.33%   82.32%   -0.02%     
===============================================
  Files               25       25              
  Lines             6482     6482              
  Branches           318      318              
===============================================
- Hits              5337     5336       -1     
- Misses            1038     1039       +1     
  Partials           107      107              
Flag Coverage Δ
rust 82.32% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dmenec

Dmenec commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

cACK

What about skip_macro_invocations = ["descriptor"] in rustfmt.toml instead? That way the next multi-line descriptor! won't break again and the skips aren't needed.

Maybe in the longer term it'd be nice if the macro just accepted a trailing comma.

@caarloshenriq caarloshenriq left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

tACK c03c3c2

Matches 1d1d24c on master. +1 to @Dmenec's skip_macro_invocations suggestion: with the skips removed and that option in rustfmt.toml, just pre-push passes.

@noahjoeris noahjoeris left a comment

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.

ACK c03c3c2

@nymius

nymius commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor Author

cACK

What about skip_macro_invocations = ["descriptor"] in rustfmt.toml instead? That way the next multi-line descriptor! won't break again and the skips aren't needed.

Maybe in the longer term it'd be nice if the macro just accepted a trailing comma.

I didn't know about the option, thanks, I'll try it. I just went for the quick fix, but will dig more on the macro solution too.

@nymius nymius changed the title Skip formatting for desciptor macro Skip formatting for descriptor macro Dec 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

4 participants