Refactoring patches

Pavel Sanda sanda at lyx.org
Mon Oct 12 20:18:50 UTC 2020


On Mon, Oct 12, 2020 at 10:36:36PM +0300, Yuriy Skalko wrote:
> > Getting rid of unnecessary includes is a valuable goal.
> > There are two things to keep in mind:
> > - One should try to get rid of redundant includes from headers first, only 
> > after that reducing .cpp files (otherwise the check of .h files becomes more 
> > tricky).
> > - some generic headers were included as a consequence of different dependencies 
> > on different gcc versions or exotic architectures..
> > 
> > What kind of tool/script you used to find out?
> > (I have something in my attic from couple years back when I was going through 
> > similar loop.)
> > 
> > Pavel
> 
> I've used cppclean. Due to transitive includes (some are 4-5 levels
> deep) it is hard to see all dependencies and make reliable cleaning. The
> tool is not very helpful. I've done only the simplest cases.
> 
> Here is slightly updated patch.

I propose to apply only changes to headers for now. I will
try to revive my old scripts which will try to remove unnecessary
includes in headers first. Only then we look on .cpp files.

Pavel


More information about the lyx-devel mailing list