Skip to content

Draft: RFC only - autogenerated explicit includes

David Edmundson requested to merge work/includes into master

A lot of the KF6 porting seems to be adjusting includes [0]. It'd be good if we could do it all automatically.

This is the output of "include-what-you-use" [1] a tool that checks compile output and works out which includes we need. Mapping files can be created for custom control of which pretty headers are the right include for a given include. There's also a tonne of random flags and options.

It's quite nice as it also magically removes includes that aren't used even changing to forward declarations where possible.

KConfig was chosen at random, it applies to any repo. The output here adds a lot of headers, but all are technically correct.

[0] plasma/kwin!2179 (merged) is just one of many [1] https://github.com/include-what-you-use/include-what-you-use

Edited by David Edmundson

Merge request reports

Loading