NovelRT icon indicating copy to clipboard operation
NovelRT copied to clipboard

Inconsistent NovelRT.h dependency

Open capnkenny opened this issue 1 year ago • 1 comments

Describe the issue: At the moment, certain implementation files still include NovelRT.h as a header file, causing all other headers to be included at once. This may be acceptable for Interop/external sources that will depend on the Engine, but we should probably attempt to have all Engine-specific sources isolated to their own required headers instead of pulling all of the things. (Fixing this would also make platform-dependent changes a little easier to manage.)

Please provide the steps to reproduce if possible:

  1. Clone the repo
  2. Open project in IDE
  3. Perform a search across the repository for "NovelRT.h"
  4. Observe results

Expected behaviour: When building the Engine target of NovelRT, the following files should not reference NovelRT.h:

  • LoggingService.cpp
  • GeoBounds.cpp
  • StepTimer.cpp
  • Misc.cpp

Please tell us about your environment:

  • Engine Version: main branch

Additional context: The biggest issue here is that certain legacy areas may not be properly include guarded, causing NovelRT.h to pull in more headers than required. Also, since NovelRT.h is used as a "catch-all" in these areas (w.r.t platform-specific includes), it is difficult to try and take these out without breaks occurring. Instead, it should be reverted only to a ease-of-use header that includes all default areas in order to provide feature parity for the likes of the Engine_Tests target, as well as the Interop namespaces (so that Interop does not break)., This, and that the offending files should be delegated to their proper namespace headers with proper include guards (if already existing - if not, one should be created for this purpose.)

capnkenny avatar Jun 19 '23 03:06 capnkenny