[vcpkg] Use more forward declarations rather than definitions (#13623)

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Cengizhan Pasaoglu 2020-10-09 08:31:21 +03:00 committed by GitHub
parent d192905986
commit 0dcc11ac22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 86 additions and 36 deletions

View File

@ -480,7 +480,7 @@ namespace vcpkg::Json
m_path.push_back(key);
auto res = internal_visit(value, visitor);
m_path.pop_back();
return std::move(res);
return res;
}
template<class Type>
Optional<Type> visit_map_field(StringView key, const Value& value, IDeserializer<Type>&& visitor)

View File

@ -1,11 +1,14 @@
#pragma once
#include <vcpkg/fwd/cmakevars.h>
#include <vcpkg/fwd/dependencies.h>
#include <vcpkg/fwd/portfileprovider.h>
#include <vcpkg/base/cstringview.h>
#include <vcpkg/base/files.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/system.process.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/commands.integrate.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/statusparagraphs.h>
@ -23,12 +26,6 @@ namespace vcpkg
struct IBinaryProvider;
}
namespace vcpkg::Dependencies
{
struct InstallPlanAction;
struct ActionPlan;
}
namespace vcpkg::System
{
struct Environment;

View File

@ -1,16 +1,12 @@
#pragma once
#include <vcpkg/fwd/dependencies.h>
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/portfileprovider.h>
namespace vcpkg::Dependencies
{
struct ActionPlan;
}
namespace vcpkg::CMakeVars
{
struct CMakeVarProvider

View File

@ -1,6 +1,5 @@
#pragma once
#include <vcpkg/build.h>
#include <vcpkg/commands.interface.h>
namespace vcpkg::Commands

View File

@ -1,5 +1,8 @@
#pragma once
#include <vcpkg/fwd/cmakevars.h>
#include <vcpkg/fwd/portfileprovider.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/util.h>
@ -15,16 +18,6 @@ namespace vcpkg::Graphs
struct Randomizer;
}
namespace vcpkg::CMakeVars
{
struct CMakeVarProvider;
}
namespace vcpkg::PortFileProvider
{
struct PortFileProvider;
}
namespace vcpkg
{
struct StatusParagraphs;

View File

@ -1,7 +1,8 @@
#pragma once
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/vcpkgpaths.h>
#include <vector>

View File

@ -1,9 +1,10 @@
#pragma once
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/base/system.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/vcpkgpaths.h>
#include <vector>

View File

@ -0,0 +1,7 @@
#pragma once
namespace vcpkg::Build
{
struct BuildInfo;
struct PreBuildInfo;
}

View File

@ -0,0 +1,6 @@
#pragma once
namespace vcpkg::CMakeVars
{
struct CMakeVarProvider;
}

View File

@ -0,0 +1,7 @@
#pragma once
namespace vcpkg::Dependencies
{
struct InstallPlanAction;
struct ActionPlan;
}

View File

@ -0,0 +1,7 @@
#pragma once
namespace vcpkg::PortFileProvider
{
struct PortFileProvider;
struct PathsPortFileProvider;
}

View File

@ -1,10 +1,11 @@
#pragma once
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/base/expected.h>
#include <vcpkg/base/util.h>
#include <vcpkg/sourceparagraph.h>
#include <vcpkg/vcpkgpaths.h>
namespace vcpkg::PortFileProvider
{

View File

@ -1,8 +1,14 @@
#pragma once
#include <vcpkg/build.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>
#include <vcpkg/fwd/build.h>
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/base/files.h>
namespace vcpkg
{
struct PackageSpec;
}
namespace vcpkg::PostBuildLint
{

View File

@ -2,11 +2,11 @@
#include <vcpkg/base/fwd/json.h>
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/base/files.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/vcpkgpaths.h>
#include <memory>
#include <string>
#include <system_error>

View File

@ -1,7 +1,10 @@
#pragma once
#include <vcpkg/fwd/dependencies.h>
#include <vcpkg/fwd/vcpkgcmdarguments.h>
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/commands.interface.h>
#include <vcpkg/dependencies.h>
namespace vcpkg::Remove
{

View File

@ -1,5 +1,7 @@
#pragma once
#include <vcpkg/fwd/vcpkgcmdarguments.h>
#include <vcpkg/base/optional.h>
#include <vcpkg/base/system.h>
@ -8,7 +10,6 @@
namespace vcpkg
{
struct TripletInstance;
struct VcpkgCmdArguments;
struct Triplet
{

View File

@ -1,11 +1,18 @@
#pragma once
#include <vcpkg/fwd/portfileprovider.h>
#include <vcpkg/fwd/vcpkgcmdarguments.h>
#include <vcpkg/fwd/vcpkgpaths.h>
#include <vcpkg/commands.interface.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/versiont.h>
namespace vcpkg
{
struct StatusParagraphs;
}
namespace vcpkg::Update
{
struct OutdatedPackage

View File

@ -2,6 +2,7 @@
#include <vcpkg/base/files.h>
#include <vcpkg/build.h>
#include <vcpkg/commands.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkgpaths.h>

View File

@ -2,6 +2,8 @@
#include <vcpkg/base/sortedvector.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/update.h>
#include <vcpkg-test/util.h>

View File

@ -17,6 +17,7 @@
#include <vcpkg/metrics.h>
#include <vcpkg/paragraphs.h>
#include <vcpkg/userconfig.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkglib.h>
#include <cassert>

View File

@ -13,6 +13,7 @@
#include <vcpkg/binarycaching.h>
#include <vcpkg/build.h>
#include <vcpkg/buildenvironment.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/commands.h>
#include <vcpkg/commands.version.h>
#include <vcpkg/dependencies.h>

View File

@ -7,6 +7,7 @@
#include <vcpkg/binarycaching.h>
#include <vcpkg/build.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/commands.ci.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/globalstate.h>

View File

@ -2,6 +2,7 @@
#include <vcpkg/base/system.print.h>
#include <vcpkg/base/util.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/commands.dependinfo.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/help.h>

View File

@ -5,6 +5,7 @@
#include <vcpkg/globalstate.h>
#include <vcpkg/help.h>
#include <vcpkg/paragraphs.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/sourceparagraph.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkglib.h>

View File

@ -2,12 +2,14 @@
#include <vcpkg/base/util.h>
#include <vcpkg/binarycaching.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/commands.upgrade.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/globalstate.h>
#include <vcpkg/help.h>
#include <vcpkg/input.h>
#include <vcpkg/install.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/statusparagraphs.h>
#include <vcpkg/update.h>
#include <vcpkg/vcpkgcmdarguments.h>

View File

@ -3,6 +3,7 @@
#include <vcpkg/base/strings.h>
#include <vcpkg/base/util.h>
#include <vcpkg/cmakevars.h>
#include <vcpkg/dependencies.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/paragraphs.h>

View File

@ -13,6 +13,7 @@
#include <vcpkg/input.h>
#include <vcpkg/install.h>
#include <vcpkg/paragraphs.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/tools.h>
#include <vcpkg/vcpkglib.h>

View File

@ -5,6 +5,7 @@
#include <vcpkg/input.h>
#include <vcpkg/metrics.h>
#include <vcpkg/packagespec.h>
#include <vcpkg/vcpkgpaths.h>
namespace vcpkg
{

View File

@ -1,6 +1,7 @@
#include <vcpkg/base/json.h>
#include <vcpkg/registries.h>
#include <vcpkg/vcpkgpaths.h>
namespace
{

View File

@ -6,6 +6,7 @@
#include <vcpkg/help.h>
#include <vcpkg/input.h>
#include <vcpkg/paragraphs.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/remove.h>
#include <vcpkg/update.h>
#include <vcpkg/vcpkglib.h>

View File

@ -3,7 +3,9 @@
#include <vcpkg/commands.h>
#include <vcpkg/help.h>
#include <vcpkg/paragraphs.h>
#include <vcpkg/portfileprovider.h>
#include <vcpkg/update.h>
#include <vcpkg/vcpkgcmdarguments.h>
#include <vcpkg/vcpkglib.h>
namespace vcpkg::Update

View File

@ -1,3 +1,4 @@
#include <vcpkg/base/json.h>
#include <vcpkg/base/system.debug.h>
#include <vcpkg/base/system.print.h>