On Sunday, April 26, 2020 5:50:40 PM CEST René J.V. Bertin wrote: > On Sunday April 26 2020 16:58:10 David Faure wrote: > >> As a side-note, I'd even argue that > >> it would make sense to provide an all-inclusive header per framework, > >> just > >> like Apple's frameworks do. > > > >It's said to improve compilation times with precompiled headers, but in > >practice nobody knows if the person compiling the code has that, so I fail > >to see the point. > > The possibility to use precompiled headers is only an argument here when > increased compilation times are brought up as an argument against such a > header. But that's not really an argument if you can continue to use just > the headers you need.
Well, then you never need all-inclusive headers. > >Who needs all of <KCoreAddons>? Nobody. > > I could just as well maintain that nobody needs any of that particular > framework ;) OK now you make no sense at all anymore, since I can give you 500 proofs of the contrary: actual pieces of code that use some parts of KCoreAddons, and none of them which use all of it. > But the question isn't who needs all of. People including > <AppKit/AppKit.h> or (better example) <Accelerate/Accelerate.h> also rarely > need all of those frameworks. It's just a convenience: no need to jump back > and forth between your editing location and the file preamble (after > deciding if you want the required additional header in the implementation > file or in the corresponding header file), and no need to maintain a long > list of include statements which ideally you should prune every time you > stop using a certain class. (Just how often do people forget to remove the > corresponding header?) And then people commit code that uses "everything", slowing down compilation times. We don't accept it in KF5 code (nor in most of KDE apps/workspace AFAIK), I don't see why we should provide something that we forbid. > I still call me seeing the warning a pure chance given the fact it's there. > The fact of me seeing it if it were not there would also be a pure chance > ... hopefully close enough to 0 ;) -Werror=undef is your friend. Actually I'll add it to my default set of flags, to see how much breaks ;-) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5