-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid cross includes that do not respect area encapsulation rules #53295
Comments
CoreUpdated 2022-03-18. Original report below.
Original list of issues
|
ServersUpdated 2022-03-28. Original report below.
Original list of issues
|
SceneUpdated 2022-03-18. Original report below.
Original list of issues
(Replaces #29730.)
|
EditorUpdated 2022-03-18.
|
ModulesUpdated 2022-03-18. Includes
|
MainUpdated 2022-03-18.
That's expected, that's why this file specifically is built before |
I can take a look to see if this can implemented in scons so we can generate a build error for a bad include |
There doesn't seem to be a natural way to do this functionality with scons APIs directly, however it should be fairly simple to code using just pure python. |
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 fromthirdparty
, 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:
godot/SConstruct
Lines 724 to 737 in 06c1b40
I'll list invalid includes in comments for each folder/area.
Steps to reproduce
n/a
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: