Repository navigation
Make JsonProcessor.h self-contained - #239
Open
bob sira (bobsira) wants to merge 1 commit into
Open
bob sira (bobsira) wants to merge 1 commit into
bob sira (bobsira) wants to merge 1 commit into
Conversation
Declare header dependencies explicitly, supply the dependencies required by Utility.h, and use forward declarations for JSON and settings types. Compile the existing parser test without PCH and include JsonProcessor.h first to guard against regressions. Addresses #223.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #223.
JsonProcessor.hdepended on the precompiled header to supply JSON, Windows, STL, and project-type declarations. Including it first in a translation unit therefore failed to compile.nlohmann/json_fwd.hpp, andUtility.hforAttributesMap.LogSourceand the existing_LoggerSettingstype instead of pulling in the settings implementation.Utility.hitself.JsonProcessor.hfirst in the existing parser tests and disable PCH for that source in the Visual Studio project. The CMake test target already compiles without PCH.No runtime logic or API signatures change.
Validation
JsonProcessor.hfirst failed with missing declarations; it succeeds after the fix.#include "JsonProcessor.h"compiles on x64 and x86 with MSVC/Y- /W4 /WX.JsonProcessorTests.cpp.Validation was scoped to the changed headers and their consumers; the full EventMonitor suite was not rerun. Its pre-existing historical-replay crash is tracked separately in #238.