Self-contained headers and no include cycles #4
No assignees
Labels
No labels
area/build
area/content
area/editor
area/engine
area/graphics
area/platform
area/repo-wide
area/tests
area/tools
bug
optional
roadmap
size/L
size/M
size/S
No project
No milestone
Blocks
Depends on
#7 CI on Forgejo Actions for Linux and Windows
UnflavoredMeson/Primal_Plus_Plus
#13 Layers, the game API boundary and the error-handling rules
UnflavoredMeson/Primal_Plus_Plus
#2 CMake build for Linux next to MSBuild, warnings as errors, pinned downloads
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
A header that compiles only after another one was included breaks as soon as include order changes, and cycles make the layers of S1 impossible to enforce.
CommonHeaders.hexpands to about 130,000 lines; headers that include what they use compile faster and say what they depend on.Decided
CommonHeaders.his an umbrella that only includes. The headers it includes (Id.h,Vector.h,FreeList.h,Math.h, ...) useCommonDefinitions.handPrimitiveTypes.hand never include it back..cppfiles may keep the umbrella. No pass.header_checktarget (one translation unit per header) andTools/check_include_cycles.py.Read first
Engine/Common/CommonHeaders.honmaster.Steps
header_checktarget and run it. Note which headers fail and why.CommonDefinitions.hout ofCommonHeaders.hand fix the failing headers.Tools/check_include_cycles.pyand fix the cycles it finds.Done when
cmake --build --preset linux-debug --target header_checkpasses.check_include_cycles.pyreports no cycles.Claude can help with
check_include_cycles.pyfrom your description of what it should report.Learn