Skip to content
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

Fix formatting #8125

Merged
merged 1 commit into from Jun 18, 2019
Merged

Fix formatting #8125

merged 1 commit into from Jun 18, 2019

Conversation

asakaev
Copy link
Contributor

@asakaev asakaev commented Jun 6, 2019

No description provided.

@scala-jenkins scala-jenkins added this to the 2.13.1 milestone Jun 6, 2019
@asakaev asakaev changed the title Fix formatting WIP: Fix formatting Jun 6, 2019
@asakaev asakaev changed the title WIP: Fix formatting Fix formatting Jun 6, 2019
Copy link
Contributor

@NthPortal NthPortal left a comment

Choose a reason for hiding this comment

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

LGTM, but I am not really an expert on what the spec ought to look like.

Additionally, I don't know how others feel about formatting-only changes (due to the history changes). I think it's an improvement, but I can't speak for others.

Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

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

I like it too.

@SethTisue
Copy link
Member

SethTisue commented Jun 9, 2019

hello @asakaev, and welcome!

we're generally cautious about accepting reformatting PRs like this one, unless the old formatting was definitely wrong and misleading, since such changes clutter up the version control history and cause merge conflicts.

writing by-name parameters in Scala as =>T, without the space, is fairly common (that's my informal impression, anyway) and neither clearly wrong nor definitely misleading

on the other hand, I did a little survey and it does seem that we're usually consistent about including the space:

~/dotty % git grep ': => A' | wc -l
     115
~/dotty % git grep ': =>A' | wc -l 
      14
~/dotty % git grep ': => T' | wc -l
     194
~/dotty % git grep ': =>T' | wc -l 
      20

~/scala.213 % git grep ': => A' | wc -l
     206
~/scala.213 % git grep ': =>A' | wc -l 
      16
~/scala.213 % git grep ': =>T' | wc -l
      25
~/scala.213 % git grep ': =>T ' | wc -l
       0

~/akka % git grep ': => A' | wc -l
      20
~/akka % git grep ': =>A' | wc -l
       0
~/akka % git grep ': => T' | wc -l
      65
~/akka % git grep ': =>T' | wc -l
       0

note that the akka repo uses scalafmt to enforce consistency, so apparently scalafmt uses the space as well.

on the balance, I think we could probably accept this, but let's wait and see what @adriaanm thinks

@SethTisue SethTisue added the welcome hello new contributor! label Jun 9, 2019
@SethTisue SethTisue requested a review from adriaanm June 18, 2019 11:27
@adriaanm adriaanm merged commit 14e469f into scala:2.13.x Jun 18, 2019
@adriaanm
Copy link
Contributor

Thanks @asakaev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
welcome hello new contributor!
Projects
None yet
6 participants