You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iceberg.apache.org by Liu Xianyang <Li...@hotmail.com> on 2023/07/18 09:05:52 UTC

Discussion about applying spotless for scala code

Hello everyone:
  I'd like the raise a discussion about applying spotless for Scala code. We need to get more advice since it will change a lot of files. We have already applied spotless for Java code which helps developers easily follow the code style. And also it makes better code management. I see there are already some discussions about this: https://github.com/apache/iceberg/issues/6736.
  I have submitted a PR for this: https://github.com/apache/iceberg/pull/8023. Hopeful get more advice from you.

Thanks,
Xianyang


回复: Discussion about applying spotless for scala code

Posted by Liu Xianyang <Li...@hotmail.com>.
Thanks Ryan and community for the feedback.

-Xianyang
________________________________
发件人: Ryan Blue <bl...@tabular.io>
发送时间: 2023年7月19日 17:44
收件人: dev@iceberg.apache.org <de...@iceberg.apache.org>
主题: Re: Discussion about applying spotless for scala code

We talked about this more in the community sync today and came to the conclusion that it probably isn't worth it until Spark 3.5 when the row-level commands are in Spark. That way we're not keeping so much in sync across repositories and can more easily turn this on without causing conflicts when applying diffs.

On Tue, Jul 18, 2023 at 8:15 PM Liu Xianyang <Li...@hotmail.com>> wrote:
Yeah, it will influence many files. The good news is there are not too many Scala files compared with Java files. There are indeed some problems to rebase code from fork or PRs. What we have done for Java code is: First, rebasing to the commit which adds the spotless config, second applying the spotless locally, then rebasing to the master latest commit.

> It also hides other commits when I do `Git Blame`.

This should be acceptable because it is basically a problem of spaces and line length.

Thanks,
Xianyang
________________________________
发件人: Manu Zhang <ow...@gmail.com>>
发送时间: 2023年7月19日 0:59
收件人: dev@iceberg.apache.org<ma...@iceberg.apache.org> <de...@iceberg.apache.org>>
主题: Re: Discussion about applying spotless for scala code

Is this the right time to do so? It will bring a lot of conflicts with open PRs and forked codebases. It also hides other commits when I do `Git Blame`.

My two cents,
Manu

On Wed, Jul 19, 2023 at 12:24 AM Liu Xianyang <Li...@hotmail.com>> wrote:
Hello everyone:
  I'd like the raise a discussion about applying spotless for Scala code. We need to get more advice since it will change a lot of files. We have already applied spotless for Java code which helps developers easily follow the code style. And also it makes better code management. I see there are already some discussions about this: https://github.com/apache/iceberg/issues/6736.
  I have submitted a PR for this: https://github.com/apache/iceberg/pull/8023. Hopeful get more advice from you.

Thanks,
Xianyang



--
Ryan Blue
Tabular

Re: Discussion about applying spotless for scala code

Posted by Ryan Blue <bl...@tabular.io>.
We talked about this more in the community sync today and came to the
conclusion that it probably isn't worth it until Spark 3.5 when the
row-level commands are in Spark. That way we're not keeping so much in sync
across repositories and can more easily turn this on without causing
conflicts when applying diffs.

On Tue, Jul 18, 2023 at 8:15 PM Liu Xianyang <Li...@hotmail.com>
wrote:

> Yeah, it will influence many files. The good news is there are not too
> many Scala files compared with Java files. There are indeed some problems
> to rebase code from fork or PRs. What we have done for Java code is: First,
> rebasing to the commit which adds the spotless config, second applying the
> spotless locally, then rebasing to the master latest commit.
>
> > It also hides other commits when I do `Git Blame`.
>
> This should be acceptable because it is basically a problem of spaces and
> line length.
>
> Thanks,
> Xianyang
> ------------------------------
> *发件人:* Manu Zhang <ow...@gmail.com>
> *发送时间:* 2023年7月19日 0:59
> *收件人:* dev@iceberg.apache.org <de...@iceberg.apache.org>
> *主题:* Re: Discussion about applying spotless for scala code
>
> Is this the right time to do so? It will bring a lot of conflicts with
> open PRs and forked codebases. It also hides other commits when I do `Git
> Blame`.
>
> My two cents,
> Manu
>
> On Wed, Jul 19, 2023 at 12:24 AM Liu Xianyang <Li...@hotmail.com>
> wrote:
>
> Hello everyone:
>   I'd like the raise a discussion about applying spotless for Scala code.
> We need to get more advice since it will change a lot of files. We have
> already applied spotless for Java code which helps developers easily follow
> the code style. And also it makes better code management. I see there are
> already some discussions about this:
> https://github.com/apache/iceberg/issues/6736.
>   I have submitted a PR for this:
> https://github.com/apache/iceberg/pull/8023. Hopeful get more advice from
> you.
>
> Thanks,
> Xianyang
>
>
>

-- 
Ryan Blue
Tabular

回复: Discussion about applying spotless for scala code

Posted by Liu Xianyang <Li...@hotmail.com>.
Yeah, it will influence many files. The good news is there are not too many Scala files compared with Java files. There are indeed some problems to rebase code from fork or PRs. What we have done for Java code is: First, rebasing to the commit which adds the spotless config, second applying the spotless locally, then rebasing to the master latest commit.

> It also hides other commits when I do `Git Blame`.

This should be acceptable because it is basically a problem of spaces and line length.

Thanks,
Xianyang
________________________________
发件人: Manu Zhang <ow...@gmail.com>
发送时间: 2023年7月19日 0:59
收件人: dev@iceberg.apache.org <de...@iceberg.apache.org>
主题: Re: Discussion about applying spotless for scala code

Is this the right time to do so? It will bring a lot of conflicts with open PRs and forked codebases. It also hides other commits when I do `Git Blame`.

My two cents,
Manu

On Wed, Jul 19, 2023 at 12:24 AM Liu Xianyang <Li...@hotmail.com>> wrote:
Hello everyone:
  I'd like the raise a discussion about applying spotless for Scala code. We need to get more advice since it will change a lot of files. We have already applied spotless for Java code which helps developers easily follow the code style. And also it makes better code management. I see there are already some discussions about this: https://github.com/apache/iceberg/issues/6736.
  I have submitted a PR for this: https://github.com/apache/iceberg/pull/8023. Hopeful get more advice from you.

Thanks,
Xianyang


Re: Discussion about applying spotless for scala code

Posted by Manu Zhang <ow...@gmail.com>.
Is this the right time to do so? It will bring a lot of conflicts with open
PRs and forked codebases. It also hides other commits when I do `Git Blame`.

My two cents,
Manu

On Wed, Jul 19, 2023 at 12:24 AM Liu Xianyang <Li...@hotmail.com>
wrote:

> Hello everyone:
>   I'd like the raise a discussion about applying spotless for Scala code.
> We need to get more advice since it will change a lot of files. We have
> already applied spotless for Java code which helps developers easily follow
> the code style. And also it makes better code management. I see there are
> already some discussions about this:
> https://github.com/apache/iceberg/issues/6736.
>   I have submitted a PR for this:
> https://github.com/apache/iceberg/pull/8023. Hopeful get more advice from
> you.
>
> Thanks,
> Xianyang
>
>