crystal-lang / crystal

The Crystal Programming Language
https://crystal-lang.org
Apache License 2.0
19.2k stars 1.61k forks source link

Enable pending formatter features #14718

Open Blacksmoke16 opened 2 weeks ago

Blacksmoke16 commented 2 weeks ago

Enables the first batch of ready formatter features as called out in #13002.

NOTE: Depends on #14713

straight-shoota commented 2 weeks ago

I noticed an issue: https://github.com/crystal-lang/crystal/pull/14209 and #14075 (partially) are backwards-incompatible changes. Two formatters, one with the changes enabled and one with it disabled, cannot agree on a common accepted style as a valid variant. This can cause friction related to crystal upgrades, which should be avoidable.

We could ensure a smooth transition by first releasing a version of the formatter which doesn't change old style to new style, but accepts the new style and does not change it back to old style.

For example the change in https://github.com/crystal-lang/crystal/pull/12951 is backwards compatible. The current formatter accepts the & style, but doesn't enforce it.

Blacksmoke16 commented 2 weeks ago

Alright, I'll see if I can put something together for that to include in this release. Then can release the part that'll migrate old to new in the next one.