Re: Unused header file inclusion

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Unused header file inclusion
Date: 2019-07-31 06:37:04
Message-ID: CALDaNm1hN1h31SrHaG5Q5xY4UPwyi=k8nXmBQov6LHRjvi=Dmw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 31, 2019 at 11:55 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Wed, Jul 31, 2019 at 11:31 AM vignesh C <vignesh21(at)gmail(dot)com> wrote:
> >
> > On Wed, Jul 31, 2019 at 11:26 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > >
> > > On Wed, Jul 31, 2019 at 11:19:08AM +0530, vignesh C wrote:
> > > > I noticed that there are many header files being included which need
> > > > not be included. I have tried this in a few files and found the
> > > > compilation and regression to be working. I have attached the patch
> > > > for the files that I tried. I tried this in CentOS, I did not find
> > > > the header files to be platform specific.
> > > > Should we pursue this further and cleanup in all the files?
> > >
> > > Do you use a particular method here or just manual deduction after
> > > looking at each file individually? If this can be cleaned up a bit, I
> > > think that's welcome. The removal of headers is easily forgotten when
> > > moving code from one file to another...
> > >
> > Thanks Michael.
> > I'm writing some perl scripts to identify this.
> > The script will scan through all the files, make changes,
> > and verify.
>
> If we can come up with some such tool, we might be able to integrate
> it with Thomas's patch tester [1] wherein it can apply the patch,
> verify if there are unnecessary includes in the patch and report the
> same.
>
> [1] - http://commitfest.cputube.org/
>
Thanks Amit.
I will post the tool along with the patch once I complete this activity. We
can enhance the tool further based on feedback and take it forward.

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-07-31 06:37:49 Re: Unused header file inclusion
Previous Message Masahiko Sawada 2019-07-31 06:29:59 Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)