Skip to content

Conversation

@benalleng
Copy link
Collaborator

@benalleng benalleng commented Dec 10, 2025

This pulls in a commit from #1027 but does not include the ci formatting from there as I believe that we can simply use treefmt-nix for all file types in the ci

Pull Request Checklist

Please confirm the following before requesting review:

@coveralls
Copy link
Collaborator

coveralls commented Dec 10, 2025

Pull Request Test Coverage Report for Build 20174624583

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 83.176%

Totals Coverage Status
Change from base Build 20173801182: 0.0%
Covered Lines: 9665
Relevant Lines: 11620

💛 - Coveralls

@benalleng benalleng force-pushed the treefmt-nix branch 2 times, most recently from 3c23e6e to 758b1ab Compare December 10, 2025 21:35
@spacebear21
Copy link
Collaborator

I think any such change should enforce the same formatting rules in CI, otherwise I can see things getting out of sync quickly

@benalleng
Copy link
Collaborator Author

Good point, marking as draft to add this formatting to the CI

@benalleng benalleng marked this pull request as draft December 10, 2025 21:44
@benalleng benalleng force-pushed the treefmt-nix branch 3 times, most recently from 7e0f278 to 9b5aef0 Compare December 10, 2025 22:41
@benalleng benalleng marked this pull request as ready for review December 10, 2025 22:49
@benalleng benalleng force-pushed the treefmt-nix branch 3 times, most recently from caa9171 to c9f1763 Compare December 11, 2025 05:27
@benalleng
Copy link
Collaborator Author

benalleng commented Dec 11, 2025

I gave it a college try to add formatting to dart but I kept getting wild diffs in the CI formatter, I don't understand why as dart is notable for having a very strict formatting style. I could never get any formatting to match the CI dart formatter locally

Copy link
Collaborator

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

nix code looks good, but i think we should figure out what's wrong with dart formatting before merging

@nothingmuch
Copy link
Collaborator

per #1220 (comment), we should add an additional rust-overlay toolchain based on the toolchain.toml rust-bin.fromRustupToolchainFile ./rust-toolchain.toml and format with that instead (it should be equivalent to the rust overlay nightly but if we ever change rust-toolchain.toml then formatting rules will stay in sync)

@spacebear21 is this what you meant here? #1221 (comment)

@spacebear21
Copy link
Collaborator

@spacebear21 is this what you meant here? #1221 (comment)

I was just asking for a CI workflow that enforces the formatting rules applied in this PR (when it was posted originally it applied formatting changes but there was no CI validation so I was concerned about eventual regressions).

@benalleng
Copy link
Collaborator Author

Are we even properly linking to our rustfmt.toml file now?

@benalleng benalleng force-pushed the treefmt-nix branch 4 times, most recently from ab29ebc to d906254 Compare December 11, 2025 21:21
@benalleng
Copy link
Collaborator Author

This commit d906254 I manually made the changes requested by the CI formatter to make it happy but ideally we would have the same options or whatever is causing these changes to be made directly in the treefmt.nix config options.

https://dart.dev/tools/dart-format the dart formatting docs are not really clear on how to add a lot of options

@benalleng benalleng force-pushed the treefmt-nix branch 4 times, most recently from 840ed52 to 7da0a9f Compare December 12, 2025 15:24
Run:
  dart format
  nixfmt
  prettier
  ruff format
  rustfmt
  shellcheck
  shfmt
  taplo format
when using git blame you will need to ensure that this ignore file is
respected with `git blame --ignore-revs-file <file>` to ensure all
commits listed there are properly ignored.
This commit adds treefmt-nix as a universal formatter to enforce
formatting across all languages in the mono repo. This adds support for
formatting dart, javascript, toml, and python beyond out current
existing formatters.
Copy link
Collaborator

@nothingmuch nothingmuch left a comment

Choose a reason for hiding this comment

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

tACK. Also confirmed nix flake check is happy for all commits.

@nothingmuch nothingmuch merged commit e1fd929 into payjoin:master Dec 12, 2025
15 checks passed
Sign up for free to 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.

5 participants