formatter with JuliaFormatter#1987
Conversation
|
I'd actually prefer Runic, it seems to work fine in StatsFuns and PDMats and I've been bitten by JuliaFormatter 2 problems a few times. GLM uses JuliaFormatter though, so there is no agreed on standard in JuliaStats yet. |
completely fine with me, I do not have preference |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #1987 +/- ##
==========================================
- Coverage 86.44% 86.43% -0.01%
==========================================
Files 147 147
Lines 8838 8861 +23
==========================================
+ Hits 7640 7659 +19
- Misses 1198 1202 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
The work is complete. Tests are passing. |
| - "min" | ||
| - "1" |
There was a problem hiding this comment.
No need to change these lines:
| - "min" | |
| - "1" | |
| - 'min' | |
| - '1' |
|
Maybe let's merge #1905 before changing the formatting. |
ararslan
left a comment
There was a problem hiding this comment.
I've been bitten by JuliaFormatter 2 problems a few times
You can pin to v1, which the JuliaFormatter README recommends if you run into issues with v2. My employer uses JuliaFormatter v2 with YASGuide extensively and have generally only run into issues in very unusual code, in which case you can surround in #!format off/on. MixedModels uses JuliaFormatter with BlueStyle on CI and that works fine.
The formatting implemented by Runic is largely inconsistent with the prevailing, albeit historically ad hoc, formatting in JuliaStats. I also find that some of its choices actively hinder readability vs. YAS or Blue.
I'd be fine with this PR if we use JuliaFormatter as initially proposed with one of the aforementioned styles, but I do not agree with using Runic.
3bede98 to
a16029f
Compare
|
Switched back to JuliaFormatting and adopted the |
I'd still prefer Runic. PDMats, StatsFuns and possibly soon StatsBase use Runic. Outside of StatsBase, it is used quite a lot as well - the whole SciML ecosystem recently switched to Runic, Documenter uses Runic, DifferentiationInterface uses Runic.... Generally, there seems to be a significant movement towards Runic |
|
I have an idea -- you can create a competing PR, and see which one gets merged first. Would be good to close the story, that it does not hang in my open pull requests |
My unsolicited two cents is that some of the movement toward Runic may be because JuliaFormatter v2 is not considered stable yet, which the package maintainers have acknowledged and is part of why they do not recommend using v2 for testing purposes yet. Runic is great, but pinning JuliaFormatter to v1.0.62 removes the burden of formatter behavior changing between minor releases. This used to be a bigger issue as this caused conflicts with JET but JuliaSyntax v1 is supported on JET. JuliaFormatter also seems to be more steadily maintained now, so I don’t think people necessarily need to give up on it yet. That said, if people simply prefer Runic’s style, that is totally reasonable too. Edit: I missed the earlier comment making the same point. Sorry about that. Leaving this up since it adds a bit on pinning JuliaFormatter and the JET/JuliaSyntax compatibility issue. |
|
There's no consensus but also no pressing need for a change, so this PR or a rebased version of it is not expected to be merge in the near future. Therefor I'm closing the PR as it is outdated anyways. |
Formatting cleanup using JuliaFormatter.format(".") to ensure consistent code style across the package. This reduces noisy diffs in future changes and improves readability. No functional changes.
Closes #1401
Modifications
.formatingwith scripts.git-blame-ignore-revstoTests
Once merged:
Update .git-blame-ignore-revs to point to the merge commit