-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Update scalafmt-core to 3.2.2 #4097
Closed
scala-steward
wants to merge
2
commits into
typelevel:main
from
scala-steward:update/scalafmt-core-3.2.2
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
version=3.2.1 | ||
version=3.2.2 | ||
align.openParenCallSite = true | ||
align.openParenDefnSite = true | ||
maxColumn = 120 | ||
|
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if scalafmt says "A" why does not it say "B" making it formatted in this way:
Because to me the current reformatting looks more weird and hard-to-read than it was before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Asked about it in the scalafmt channel:
https://discord.com/channels/632642981228314653/632665341864181780/923692567370022962
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say that is the correct format inline with braceless syntax. Interesting that a minor point release would do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not seem correct to me. In fact, when I first saw the change, I got surprised because I didn't find the
catch
block for thetry
right away. Because the way how scalafmt formats it may now create an impression thatcatch
belongs to somewhere else deep inside rather than the outermosttry
. Similar to:looks quite confusing but
looks way clearer and easier to read.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I was looking at the
try
where it wrappedta match {
. what happens if you wrap thecatch
to the next line, does it stay?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in 3.3.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kitbellew personally I don't want to configure it. I just want it to have a good standard style even if it isn't my first choice and I want that configuration to not require updates. Instead my CIs have been going red because updating scalafmt has recently changed either the formatting or the configuration file or both. I appreciate the work people have given on the project, I just wish it were more conservative so that unless you get a major version bump your previous config will be valid and the format won't change (unless you opt in to new versions).
Anyway this is OT for here but indulged myself. Apologies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if nothing changes... why do you need to upgrade?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I wonder – if it supposed to be fixed in version 3.3.0 (which just has been released) then should we just skip this one and close this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kitbellew we upgrade because scala-steward sends the update and there may be bug fixes or security fixes. Those are the motivations I think most libraries have for updating.