microsoft / microsoft/windows-container-tools

JsonProcessor.h is not self-contained (missing includes / forward declarations)

Open Beginner friendly
#223 0 comments 1 reaction 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.