Layers, the game API boundary and the error-handling rules #13
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
Depends on
#4 Self-contained headers and no include cycles
UnflavoredMeson/Primal_Plus_Plus
#11 The engine as one shared library
UnflavoredMeson/Primal_Plus_Plus
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
UnflavoredMeson/Primal_Plus_Plus#13
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
Without a dependency table, the engine's folders grow into each other (the fork found
ContentandGraphicstangled). Fixing the game API's public set now keeps game projects compiling against a small surface.Decided
Tools/check_layers.py(--graphprints it). A new dependency fails the check: change the code, or add it with the reason.Core/Engine.cpp,Core/Main*.cpp,Core/Frame.*) is the top layerApp;Core/LogandCore/Jobsare the bottom.Engine/EngineAPI/is the game API (game projects see only that folder; its headers include onlyEngineAPI/and a public set: ids, primitive types, math,utl::vector, Log); the editor links the engine directly (S7); everything else is internal.enum classfor enums,std::to_underlying()for their values; bitmasks and array-slot enums stay plain wrappers on purpose.std::expected<T, E>for fallible functions,Eanenum classof reasons a caller acts on;[[nodiscard]]; never.value().Read first
UnflavoredMeson/Primal#4(group A and C: what was converted and what stayed on purpose).Steps
check_layers.pyand draw today's graph. Decide each existing edge: allowed, or a tangle to fix.EngineAPI/headers.enum class.std::expected(content loading is a good first one) and its callers.Done when
check_layers.pypasses and is inci.sh checks; 0 warnings both OSes; tidy 0; UnitTests pass.Claude can help with
Learn