You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Francesco Guardiani <fr...@ververica.com> on 2022/04/12 15:21:04 UTC

[ANNOUNCE] New scalafmt formatter has been merged

Hi all,
The new scalafmt formatter has been merged. From now on, just using mvn
spotless:apply as usual will format both Java and Scala, and Intellij will
automatically pick up the scalafmt config for who has the Scala plugin
installed. If it doesn't, just go in Preferences > Editor > Code Style >
Scala and change the Formatter to scalafmt. If you use the actions on save
plugin, make sure you have the reformat on save enabled for Scala.

For more details on integration with IDEs, please refer to
https://scalameta.org/scalafmt/docs/installation.html

If you have a pending PR with Scala changes, chances are you're going to
have conflicts with upstream/master now. In order to fix it, here is the
suggested procedure:

   - Do an interactive rebase on commit
   3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit before the
   refactoring of the whole codebase, fixing as usual the conflicting changes.
   This will make sure you won't miss the changes between your branch and
   master *before* the reformatting commit.
   - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
   accepting all changes from your local branch. You can easily do that via git
   rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
   - Run mvn spotless:apply and commit all the changes
   - Do an interactive rebase on upstream/master. This will make sure you
   won't miss the changes between your branch and master *after* the
   reformatting commit.
   - Force push your branch to update the PR

Sorry for this noise!

Thank you,
FG

-- 

Francesco Guardiani | Software Engineer

francesco@ververica.com


<https://www.ververica.com/>

Follow us @VervericaData

--

Join Flink Forward <https://flink-forward.org/> - The Apache Flink
Conference

Stream Processing | Event Driven | Real Time

--

Ververica GmbH | Invalidenstrasse 115, 10115 Berlin, Germany

--

Ververica GmbH

Registered at Amtsgericht Charlottenburg: HRB 158244 B

Managing Directors: Karl Anton Wehner, Holger Temme, Yip Park Tung Jason,
Jinwei (Kevin) Zhang

Re: [ANNOUNCE] New scalafmt formatter has been merged

Posted by Jingsong Li <ji...@gmail.com>.
Thanks for your work, Francesco

Best,
Jingsong


On Wed, Apr 13, 2022 at 6:37 PM Guowei Ma <gu...@gmail.com> wrote:
>
> Hi, Francesco
> Thanks for your work!
> Best,
> Guowei
>
>
> On Wed, Apr 13, 2022 at 5:35 PM Dian Fu <di...@gmail.com> wrote:
>
> > Thanks a lot for this great work Francesco!
> >
> > Regards,
> > Dian
> >
> > On Wed, Apr 13, 2022 at 3:23 PM Marios Trivyzas <ma...@gmail.com> wrote:
> >
> > > Thank you for this Francesco!
> > >
> > > It will really improve the lives of everyone touching scala code!
> > >
> > > Best,
> > > Marios
> > >
> > > On Wed, Apr 13, 2022 at 9:55 AM Timo Walther <tw...@apache.org> wrote:
> > >
> > > > Thanks for the great work Francesco!
> > > >
> > > > This will improve the contributor productivity a lot and ease reviews.
> > > > This change was long overdue.
> > > >
> > > > Regards,
> > > > Timo
> > > >
> > > > Am 12.04.22 um 17:21 schrieb Francesco Guardiani:
> > > > > Hi all,
> > > > > The new scalafmt formatter has been merged. From now on, just using
> > mvn
> > > > > spotless:apply as usual will format both Java and Scala, and Intellij
> > > > will
> > > > > automatically pick up the scalafmt config for who has the Scala
> > plugin
> > > > > installed. If it doesn't, just go in Preferences > Editor > Code
> > Style
> > > >
> > > > > Scala and change the Formatter to scalafmt. If you use the actions on
> > > > save
> > > > > plugin, make sure you have the reformat on save enabled for Scala.
> > > > >
> > > > > For more details on integration with IDEs, please refer to
> > > > > https://scalameta.org/scalafmt/docs/installation.html
> > > > >
> > > > > If you have a pending PR with Scala changes, chances are you're going
> > > to
> > > > > have conflicts with upstream/master now. In order to fix it, here is
> > > the
> > > > > suggested procedure:
> > > > >
> > > > >     - Do an interactive rebase on commit
> > > > >     3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit
> > > before
> > > > the
> > > > >     refactoring of the whole codebase, fixing as usual the
> > conflicting
> > > > changes.
> > > > >     This will make sure you won't miss the changes between your
> > branch
> > > > and
> > > > >     master *before* the reformatting commit.
> > > > >     - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > > > >     accepting all changes from your local branch. You can easily do
> > > that
> > > > via git
> > > > >     rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > > > >     - Run mvn spotless:apply and commit all the changes
> > > > >     - Do an interactive rebase on upstream/master. This will make
> > sure
> > > > you
> > > > >     won't miss the changes between your branch and master *after* the
> > > > >     reformatting commit.
> > > > >     - Force push your branch to update the PR
> > > > >
> > > > > Sorry for this noise!
> > > > >
> > > > > Thank you,
> > > > > FG
> > > > >
> > > >
> > > >
> > >
> > > --
> > > Marios
> > >
> >

Re: [ANNOUNCE] New scalafmt formatter has been merged

Posted by Guowei Ma <gu...@gmail.com>.
Hi, Francesco
Thanks for your work!
Best,
Guowei


On Wed, Apr 13, 2022 at 5:35 PM Dian Fu <di...@gmail.com> wrote:

> Thanks a lot for this great work Francesco!
>
> Regards,
> Dian
>
> On Wed, Apr 13, 2022 at 3:23 PM Marios Trivyzas <ma...@gmail.com> wrote:
>
> > Thank you for this Francesco!
> >
> > It will really improve the lives of everyone touching scala code!
> >
> > Best,
> > Marios
> >
> > On Wed, Apr 13, 2022 at 9:55 AM Timo Walther <tw...@apache.org> wrote:
> >
> > > Thanks for the great work Francesco!
> > >
> > > This will improve the contributor productivity a lot and ease reviews.
> > > This change was long overdue.
> > >
> > > Regards,
> > > Timo
> > >
> > > Am 12.04.22 um 17:21 schrieb Francesco Guardiani:
> > > > Hi all,
> > > > The new scalafmt formatter has been merged. From now on, just using
> mvn
> > > > spotless:apply as usual will format both Java and Scala, and Intellij
> > > will
> > > > automatically pick up the scalafmt config for who has the Scala
> plugin
> > > > installed. If it doesn't, just go in Preferences > Editor > Code
> Style
> > >
> > > > Scala and change the Formatter to scalafmt. If you use the actions on
> > > save
> > > > plugin, make sure you have the reformat on save enabled for Scala.
> > > >
> > > > For more details on integration with IDEs, please refer to
> > > > https://scalameta.org/scalafmt/docs/installation.html
> > > >
> > > > If you have a pending PR with Scala changes, chances are you're going
> > to
> > > > have conflicts with upstream/master now. In order to fix it, here is
> > the
> > > > suggested procedure:
> > > >
> > > >     - Do an interactive rebase on commit
> > > >     3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit
> > before
> > > the
> > > >     refactoring of the whole codebase, fixing as usual the
> conflicting
> > > changes.
> > > >     This will make sure you won't miss the changes between your
> branch
> > > and
> > > >     master *before* the reformatting commit.
> > > >     - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > > >     accepting all changes from your local branch. You can easily do
> > that
> > > via git
> > > >     rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > > >     - Run mvn spotless:apply and commit all the changes
> > > >     - Do an interactive rebase on upstream/master. This will make
> sure
> > > you
> > > >     won't miss the changes between your branch and master *after* the
> > > >     reformatting commit.
> > > >     - Force push your branch to update the PR
> > > >
> > > > Sorry for this noise!
> > > >
> > > > Thank you,
> > > > FG
> > > >
> > >
> > >
> >
> > --
> > Marios
> >
>

Re: [ANNOUNCE] New scalafmt formatter has been merged

Posted by Dian Fu <di...@gmail.com>.
Thanks a lot for this great work Francesco!

Regards,
Dian

On Wed, Apr 13, 2022 at 3:23 PM Marios Trivyzas <ma...@gmail.com> wrote:

> Thank you for this Francesco!
>
> It will really improve the lives of everyone touching scala code!
>
> Best,
> Marios
>
> On Wed, Apr 13, 2022 at 9:55 AM Timo Walther <tw...@apache.org> wrote:
>
> > Thanks for the great work Francesco!
> >
> > This will improve the contributor productivity a lot and ease reviews.
> > This change was long overdue.
> >
> > Regards,
> > Timo
> >
> > Am 12.04.22 um 17:21 schrieb Francesco Guardiani:
> > > Hi all,
> > > The new scalafmt formatter has been merged. From now on, just using mvn
> > > spotless:apply as usual will format both Java and Scala, and Intellij
> > will
> > > automatically pick up the scalafmt config for who has the Scala plugin
> > > installed. If it doesn't, just go in Preferences > Editor > Code Style
> >
> > > Scala and change the Formatter to scalafmt. If you use the actions on
> > save
> > > plugin, make sure you have the reformat on save enabled for Scala.
> > >
> > > For more details on integration with IDEs, please refer to
> > > https://scalameta.org/scalafmt/docs/installation.html
> > >
> > > If you have a pending PR with Scala changes, chances are you're going
> to
> > > have conflicts with upstream/master now. In order to fix it, here is
> the
> > > suggested procedure:
> > >
> > >     - Do an interactive rebase on commit
> > >     3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit
> before
> > the
> > >     refactoring of the whole codebase, fixing as usual the conflicting
> > changes.
> > >     This will make sure you won't miss the changes between your branch
> > and
> > >     master *before* the reformatting commit.
> > >     - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > >     accepting all changes from your local branch. You can easily do
> that
> > via git
> > >     rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
> > >     - Run mvn spotless:apply and commit all the changes
> > >     - Do an interactive rebase on upstream/master. This will make sure
> > you
> > >     won't miss the changes between your branch and master *after* the
> > >     reformatting commit.
> > >     - Force push your branch to update the PR
> > >
> > > Sorry for this noise!
> > >
> > > Thank you,
> > > FG
> > >
> >
> >
>
> --
> Marios
>

Re: [ANNOUNCE] New scalafmt formatter has been merged

Posted by Marios Trivyzas <ma...@gmail.com>.
Thank you for this Francesco!

It will really improve the lives of everyone touching scala code!

Best,
Marios

On Wed, Apr 13, 2022 at 9:55 AM Timo Walther <tw...@apache.org> wrote:

> Thanks for the great work Francesco!
>
> This will improve the contributor productivity a lot and ease reviews.
> This change was long overdue.
>
> Regards,
> Timo
>
> Am 12.04.22 um 17:21 schrieb Francesco Guardiani:
> > Hi all,
> > The new scalafmt formatter has been merged. From now on, just using mvn
> > spotless:apply as usual will format both Java and Scala, and Intellij
> will
> > automatically pick up the scalafmt config for who has the Scala plugin
> > installed. If it doesn't, just go in Preferences > Editor > Code Style >
> > Scala and change the Formatter to scalafmt. If you use the actions on
> save
> > plugin, make sure you have the reformat on save enabled for Scala.
> >
> > For more details on integration with IDEs, please refer to
> > https://scalameta.org/scalafmt/docs/installation.html
> >
> > If you have a pending PR with Scala changes, chances are you're going to
> > have conflicts with upstream/master now. In order to fix it, here is the
> > suggested procedure:
> >
> >     - Do an interactive rebase on commit
> >     3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit before
> the
> >     refactoring of the whole codebase, fixing as usual the conflicting
> changes.
> >     This will make sure you won't miss the changes between your branch
> and
> >     master *before* the reformatting commit.
> >     - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
> >     accepting all changes from your local branch. You can easily do that
> via git
> >     rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
> >     - Run mvn spotless:apply and commit all the changes
> >     - Do an interactive rebase on upstream/master. This will make sure
> you
> >     won't miss the changes between your branch and master *after* the
> >     reformatting commit.
> >     - Force push your branch to update the PR
> >
> > Sorry for this noise!
> >
> > Thank you,
> > FG
> >
>
>

-- 
Marios

Re: [ANNOUNCE] New scalafmt formatter has been merged

Posted by Timo Walther <tw...@apache.org>.
Thanks for the great work Francesco!

This will improve the contributor productivity a lot and ease reviews. 
This change was long overdue.

Regards,
Timo

Am 12.04.22 um 17:21 schrieb Francesco Guardiani:
> Hi all,
> The new scalafmt formatter has been merged. From now on, just using mvn
> spotless:apply as usual will format both Java and Scala, and Intellij will
> automatically pick up the scalafmt config for who has the Scala plugin
> installed. If it doesn't, just go in Preferences > Editor > Code Style >
> Scala and change the Formatter to scalafmt. If you use the actions on save
> plugin, make sure you have the reformat on save enabled for Scala.
>
> For more details on integration with IDEs, please refer to
> https://scalameta.org/scalafmt/docs/installation.html
>
> If you have a pending PR with Scala changes, chances are you're going to
> have conflicts with upstream/master now. In order to fix it, here is the
> suggested procedure:
>
>     - Do an interactive rebase on commit
>     3ea3fee5ac996f6ae8836c3cba252f974d20bd2e, which is the commit before the
>     refactoring of the whole codebase, fixing as usual the conflicting changes.
>     This will make sure you won't miss the changes between your branch and
>     master *before* the reformatting commit.
>     - Do a rebase on commit 91d81c427aa6312841ca868d54e8ce6ea721cd60
>     accepting all changes from your local branch. You can easily do that via git
>     rebase -Xours 91d81c427aa6312841ca868d54e8ce6ea721cd60
>     - Run mvn spotless:apply and commit all the changes
>     - Do an interactive rebase on upstream/master. This will make sure you
>     won't miss the changes between your branch and master *after* the
>     reformatting commit.
>     - Force push your branch to update the PR
>
> Sorry for this noise!
>
> Thank you,
> FG
>