You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iceberg.apache.org by Vlad Rozov <vr...@apache.org> on 2020/02/18 23:53:53 UTC

Static import

Hi,

Should static imports be prohibited for all packages or “org.apache.iceberg.*” should be excluded from the avoid static imports rule?

Thank you,

Vlad

Re: Static import

Posted by Vlad Rozov <vr...@apache.org>.
Please review https://github.com/apache/incubator-iceberg/pull/816.

Thank you,

Vlad

On 2020/02/19 20:09:45, Ryan Blue <rb...@netflix.com.INVALID> wrote: 
> Sounds fine to me. Can you open a PR for this?
> 
> On Wed, Feb 19, 2020 at 11:40 AM Vlad Rozov <vr...@apache.org> wrote:
> 
> > Hi Ryan,
> >
> > Currently, it is a cherry-pick of classes from org.apache.iceberg and few
> > other packages likely based on minimizing existing static imports plus all
> > tests being excluded from the avoid static import rule. I'd suggest
> > removing all exceptions from the rule and prohibiting static import for all
> > packages/classes. Test classes and a few classes that extensively use
> > static import can be added to the rule suppression list.
> >
> > Thank you,
> >
> > Vlad
> >
> > On 2020/02/19 18:55:38, Ryan Blue <rb...@netflix.com.INVALID> wrote:
> > > Hi Vlad,
> > >
> > > What is the current rule? What do you think we should change it to and
> > why
> > > is that a good idea?
> > >
> > > On Tue, Feb 18, 2020 at 3:54 PM Vlad Rozov <vr...@apache.org> wrote:
> > >
> > > > Hi,
> > > >
> > > > Should static imports be prohibited for all packages or
> > > > “org.apache.iceberg.*” should be excluded from the avoid static imports
> > > > rule?
> > > >
> > > > Thank you,
> > > >
> > > > Vlad
> > >
> > >
> > >
> > > --
> > > Ryan Blue
> > > Software Engineer
> > > Netflix
> > >
> >
> 
> 
> -- 
> Ryan Blue
> Software Engineer
> Netflix
> 

Re: Static import

Posted by Ryan Blue <rb...@netflix.com.INVALID>.
Sounds fine to me. Can you open a PR for this?

On Wed, Feb 19, 2020 at 11:40 AM Vlad Rozov <vr...@apache.org> wrote:

> Hi Ryan,
>
> Currently, it is a cherry-pick of classes from org.apache.iceberg and few
> other packages likely based on minimizing existing static imports plus all
> tests being excluded from the avoid static import rule. I'd suggest
> removing all exceptions from the rule and prohibiting static import for all
> packages/classes. Test classes and a few classes that extensively use
> static import can be added to the rule suppression list.
>
> Thank you,
>
> Vlad
>
> On 2020/02/19 18:55:38, Ryan Blue <rb...@netflix.com.INVALID> wrote:
> > Hi Vlad,
> >
> > What is the current rule? What do you think we should change it to and
> why
> > is that a good idea?
> >
> > On Tue, Feb 18, 2020 at 3:54 PM Vlad Rozov <vr...@apache.org> wrote:
> >
> > > Hi,
> > >
> > > Should static imports be prohibited for all packages or
> > > “org.apache.iceberg.*” should be excluded from the avoid static imports
> > > rule?
> > >
> > > Thank you,
> > >
> > > Vlad
> >
> >
> >
> > --
> > Ryan Blue
> > Software Engineer
> > Netflix
> >
>


-- 
Ryan Blue
Software Engineer
Netflix

Re: Static import

Posted by Vlad Rozov <vr...@apache.org>.
Hi Ryan,

Currently, it is a cherry-pick of classes from org.apache.iceberg and few other packages likely based on minimizing existing static imports plus all tests being excluded from the avoid static import rule. I'd suggest removing all exceptions from the rule and prohibiting static import for all packages/classes. Test classes and a few classes that extensively use static import can be added to the rule suppression list.

Thank you,

Vlad 

On 2020/02/19 18:55:38, Ryan Blue <rb...@netflix.com.INVALID> wrote: 
> Hi Vlad,
> 
> What is the current rule? What do you think we should change it to and why
> is that a good idea?
> 
> On Tue, Feb 18, 2020 at 3:54 PM Vlad Rozov <vr...@apache.org> wrote:
> 
> > Hi,
> >
> > Should static imports be prohibited for all packages or
> > “org.apache.iceberg.*” should be excluded from the avoid static imports
> > rule?
> >
> > Thank you,
> >
> > Vlad
> 
> 
> 
> -- 
> Ryan Blue
> Software Engineer
> Netflix
> 

Re: Static import

Posted by Ryan Blue <rb...@netflix.com.INVALID>.
Hi Vlad,

What is the current rule? What do you think we should change it to and why
is that a good idea?

On Tue, Feb 18, 2020 at 3:54 PM Vlad Rozov <vr...@apache.org> wrote:

> Hi,
>
> Should static imports be prohibited for all packages or
> “org.apache.iceberg.*” should be excluded from the avoid static imports
> rule?
>
> Thank you,
>
> Vlad



-- 
Ryan Blue
Software Engineer
Netflix