Description
Godot version
4.0.dev (06c1b40)
System information
Any
Issue description
The engine codebase is compartmentalized in areas/folders which have a defined dependency order to prevent both cyclic dependencies and general bad design patterns.
To ensure this encapsulation, we need to make sure that we don't include headers from high level areas in low level areas. For example core
is the lowest level area, so it shouldn't include headers from any other folder (aside from thirdparty
, which is independent from Godot code).
We should add CI checks to prevent adding such invalid includes, but first we need to fix the problems we already have in the codebase (#29730 is related, this issue is the same but for the whole codebase/dependency path).
The dependency order should follow the build order as defined here:
Lines 724 to 737 in 06c1b40
- core
- servers
- scene
- drivers (no issue)
- editor
- modules
- tests (no issue)
- main
- platform (no issue since last)
I'll list invalid includes in comments for each folder/area.
Steps to reproduce
n/a
Minimal reproduction project
No response
Metadata
Assignees
Type
Projects
Status
No status