serenity
serenity copied to clipboard
HeaderCheck: Let's make sure that our headers actually compile!
Let's say we have a file compile_me.cpp
, like this:
// file: compile_me.cpp
#include <LibDNS/Question.h>
// That's all!
Before this PR, it didn't compile.
HeaderCheck is a tool that automatically tries to compile all headers this way. (All headers in Userland/Libraries/
.) However, doing so takes a long time, and it sucks when a CI build fails due to this after a long time. 1 2 3.
This PR:
- fixes all of the existing problems, including the nasty dependency cycle in LibWeb involving
CSS::Length
- includes AK into the HeaderCheck scope
- runs HeaderCheck as a weekly cronjob that runs at 2am every morning
Here's a preview how this will look: https://github.com/BenWiederhake/serenity/actions/runs/3048260526/jobs/4913127822
Notice that it only takes 8 minutes (plus 14 minutes to build the toolchain from scratch), so I must once again recommend that HeaderCheck be run on every CI execution, but oh well.
And just to hammer down the point that this problem isn't imaginary: people sometimes have to first fiddle with unrelated headers in order to do their work: https://github.com/SerenityOS/serenity/pull/15228/commits/6089d4e56a5827a12098b168eb9822d26f524ec7