-
Notifications
You must be signed in to change notification settings - Fork 2.3k
chore: solar-powered fmt rollout #11570
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
|
need to go through failures in forge fmt job from this repo, there's a few bugs with eg concatenated string literals and others which i can't tell if they're expected |
Contributor
Author
|
yes, i'm working on that should have it ready soon 🤝 |
DaniPopes
reviewed
Sep 9, 2025
DaniPopes
reviewed
Sep 10, 2025
DaniPopes
approved these changes
Sep 10, 2025
78 tasks
grandizzy
added a commit
that referenced
this pull request
Sep 24, 2025
…10907) * init * wip * wip * add dbg from prettyplease * wip * fixes, pragma&imports * feat: using, types, literals * feat: contract * rm duplicate testdata * wip: finish items; exprs, stmts * wips * feat: line_length, tab_width * feat: contract_new_lines * wip: single_line_statement_blocks * tweaks * chore: bump solar to latest main * fix: test dir * bump * fix docs * fix: adjust '()' for modifier calls * test: typed yul does not exist anymore argotorg/solidity#15329 * test: function parameters cannot be empty * fix: adjust '()' for modifier calls for real * fix: forge fmt hates '*' imports * test: fix some invalid syntax * test: disable-stop does not exist * test: fix all parse errors * fix: literal touchups * bump * test: add snapshotting * test: update NumberLiteralUnderscore * fixes * struct space * test: fix StructDefinition; empty structs are not allowed anyway * test: update EventDefinition; matches Solidity style guide * test: update EnumDefinition; same as StructDefinition * test: update StructDefinition 2 * fix: comments in structs/enums * test: update ErrorDefinition; matches Solidity style guide * feat: print docs with other comments; update EnumVariants * chore: update EnumDefinition, StructDefinition * chore: readd post_break * chore: rename is_hardbreak_tok * feat: cleanups, more impls * test: fix some compile errors * feat: add FormatterResult with more variants * stuff * refactor: move print_item arms into their own functions * chore: consolidate item hardbreaks * fix: inline config parsing for block comments * wip: rm FunctionLike, wip functions * fix: clamp margin to max as well * megawip * feat: most of yul * wip: try-catch * wip: try-catch * feat: print compact tuple * wip: inline comments * wip: try-cactch * bump solar to have try-catch spans (#10832) * wip comment fmt * wip: array expr * finish arrays * block comments * doc block comments * ternary operators * wip: fn header * wip: fn header * fix: doc block comments + block braces * refactor state to organize helpers * fix commasep with initial trailing cmnt * fix: improve contract fmt * fix: block comments + contract definition * fix: wrap trailing comments * fix fn alingment * fix: rmv unecessary check * working fn headers!!! * block with comments at the beginning * bump solar * inline if statements based on user config * operator expr * finish binary operators + housekeeping * housekeeping * feat: binary expressions * fix: string literals * refactor comments + finish mappings * named functions * item spacing * more flexible comments + return stmts * var definition and flexible comments (#11093) * comment wrapping * sorted imports * middle cmnts for arrays and literals with subdenominations * revert: solar won't have spanned dataloc + subdenom * refactor inline config + almost finished impl * finish inline disable * finish inline disable * wip inline disable for repros * passing repros * almost working yul * chore: remove unrelated changes / merge artifacts * chore: remove unrelated changes / merge artifacts 2 * chore: remove unrelated changes / merge artifacts 3 * update fmt files to reflect current status * enable both passes * undo repros changes * config: style = tabs * test: inline config * style: drop "lint" references in favor of "ids" * function header config * finish fn header config! * re-enable 2nd pass * finish fn header style * feat: yul * test: update tracking cmnts * fix: yul repros * chore: small comment * chore: random + typos * chore: rm dead code * chore: rm unused vars * chore: clippy --fix * chore: some manual clippying * chore: final clippy --fix * refactor: tidy up * yul: inline blocks * yul: inline fn params * ensure all tests are successful * chore(fmt): merge new compiler setup (#11487) * patch/impl/test pending repros * style: typos * docs: update readme * docs: readme feedback * style: clippy * fix: merge conflicts * fix: disable legacy fmt tests * fix: config test * fix(win): normalize breaks * style: clippy * fix(win): normalize escaped quotes * fix(win): normalize multiline strings * fix(win): only normalize line breaks for expected data * chore: solar-powered fmt rollout (#11570) * fix: comment spans for asm + try blocks * fix: don't fmt yul addresses * fix: empty buffer due to really long comment * add repro * Revert "fix: empty buffer due to really long comment" This reverts commit f6768b4. * fix: advance cursor correctly in print_comment * fix: bin op indentation in complex exprs * docs Co-authored-by: DaniPopes <[email protected]> * chore: clean up * refactor: inline config * chore: share inline config * feat: remove HIR inline config visitor * test: bless * style: clippy * feat(fmt): call chain awareness (#11611) * wip: better call chains + return stmts + more tests * fix: more yul cmnts * fix: modifier cmnts + more yul cmnts * fix: returns with bin ops * fix breaks, still pending indentation * wip: call cahins and nested... getting closer * call stack to fmt complex calls * fix: more yul cmnts * Fix config test, typos * wip * fix: new call alignement cases * Fix tests * fix: return + bin ops + calls * style: clippy * feat: wrap long comments and merge with next line * fix: stale test * style: rmv comments * fmt nits (#11750) * nits * Try no format * chore: simplify call logic * fix: reenable 2nd pass * chore: cleanup * docs: solar cmnt * format testdata with new style * fix: extra space in function type * Readd relevant todo * style: use span builder methods * Review changes * fix: remove outdated cmnt * fix: test spacing * Revert "fix: test spacing" This reverts commit 541f4c8. --------- Co-authored-by: 0xrusowsky <[email protected]> --------- Co-authored-by: DaniPopes <[email protected]> Co-authored-by: grandizzy <[email protected]> Co-authored-by: grandizzy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
deprecates
forge-fmt(solang-based) withforge-fmt-2(solar-based)Notes
forge-docis built using solang's AST + used to rely onforge fmt.in order to have a smoother migration, the old formatter has been removed and the required formatter/solang deps, have been temporarily moved into the
doc/crate. A follow-up PR to remove the solang dep from forge-doc will also take place.