microsoft / microsoft/windows-container-tools
JsonProcessor.h is not self-contained (missing includes / forward declarations)
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 277
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
Problem
\JsonProcessor.h\ relies on the precompiled header (\pch.h) to provide
lohmann::json, \AttributesMap, \LoggerSettings, \LogSource, and several STL types. Any translation unit that includes it without the PCH will fail to compile.
This makes the header fragile and increases coupling.
Expected behavior
\JsonProcessor.h\ should compile standalone. Include the minimal required headers (or add forward declarations where possible) so that it is self-contained.
Types currently missing from the header:
| Symbol | Source |
|---|---|
| \ | |
| lohmann::json\ | <nlohmann/json.hpp>\ or forward-declare \ |
| lohmann::json\ | |
| \AttributesMap\ | \Utility.h\ |
| \LoggerSettings\ | \Parser/LoggerSettings.h\ |
| \LogSource\ | \Parser/LoggerSettings.h\ |
| \std::shared_ptr\ | <memory>\ |
| \std::vector\ | <vector>\ (already included) |
| \std::string\ | <string>\ (already included) |
Context
Raised during Copilot code review on PR #222.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with JsonProcessor.h and inspect its current dependencies on pch.h, Utility.h, and Parser/LoggerSettings.h. Check the header in a translation unit without the precompiled header, then add the minimal includes or forward declarations listed in the issue; done means JsonProcessor.h compiles standalone.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 76/100