Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename / Rearrange BinaryCache functions #1057

Merged
merged 4 commits into from
May 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion include/vcpkg-test/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

#include <catch2/catch.hpp>

#include <vcpkg/base/fwd/files.h>

#include <vcpkg/fwd/tools.h>

#include <vcpkg/base/files.h>
#include <vcpkg/base/format.h>
#include <vcpkg/base/messages.h>
#include <vcpkg/base/pragmas.h>
#include <vcpkg/base/sortedvector.h>
#include <vcpkg/base/strings.h>

#include <vcpkg/packagespec.h>
Expand Down Expand Up @@ -174,4 +177,12 @@ namespace vcpkg::Test
void check_json_eq_ordered(const Json::Array& l, const Json::Array& r);

const Path& base_temporary_directory() noexcept;

Optional<std::string> diff_lines(StringView a, StringView b);
}

#define REQUIRE_LINES(a, b) \
do \
{ \
if (auto delta = ::vcpkg::Test::diff_lines((a), (b))) FAIL(*delta.get()); \
} while (0)
5 changes: 3 additions & 2 deletions include/vcpkg/binarycaching.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ namespace vcpkg
void clear();
};

ExpectedL<BinaryConfigParserState> create_binary_providers_from_configs_pure(const std::string& env_string,
View<std::string> args);
ExpectedL<BinaryConfigParserState> parse_binary_provider_configs(const std::string& env_string,
View<std::string> args);

ExpectedL<std::vector<std::unique_ptr<IBinaryProvider>>> create_binary_providers_from_configs(
const VcpkgPaths& paths, View<std::string> args);

Expand Down
2 changes: 0 additions & 2 deletions include/vcpkg/commands.build.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@ namespace vcpkg
const FullPackageSpec& full_spec,
Triplet host_triplet,
const PathsPortFileProvider& provider,
BinaryCache& binary_cache,
const IBuildLogsRecorder& build_logs_recorder,
const VcpkgPaths& paths);
void perform_and_exit_ex(const VcpkgCmdArguments& args,
const FullPackageSpec& full_spec,
Triplet host_triplet,
const PathsPortFileProvider& provider,
BinaryCache& binary_cache,
const IBuildLogsRecorder& build_logs_recorder,
const VcpkgPaths& paths);

Expand Down
17 changes: 8 additions & 9 deletions include/vcpkg/commands.install.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,19 @@ namespace vcpkg
const Filesystem& fs,
const InstalledPaths& installed);

InstallSummary perform(const VcpkgCmdArguments& args,
ActionPlan& action_plan,
const KeepGoing keep_going,
const VcpkgPaths& paths,
StatusParagraphs& status_db,
BinaryCache& binary_cache,
const IBuildLogsRecorder& build_logs_recorder,
const CMakeVars::CMakeVarProvider& var_provider);
InstallSummary execute_plan(const VcpkgCmdArguments& args,
const ActionPlan& action_plan,
const KeepGoing keep_going,
const VcpkgPaths& paths,
StatusParagraphs& status_db,
BinaryCache& binary_cache,
const IBuildLogsRecorder& build_logs_recorder);

void perform_and_exit(const VcpkgCmdArguments& args,
const VcpkgPaths& paths,
Triplet default_triplet,
Triplet host_triplet);
} // namespace vcpkg::Install

void track_install_plan(ActionPlan& plan);
void track_install_plan(const ActionPlan& plan);
}
1 change: 0 additions & 1 deletion include/vcpkg/commands.set-installed.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ namespace vcpkg::Commands::SetInstalled
void perform_and_exit_ex(const VcpkgCmdArguments& args,
const VcpkgPaths& paths,
const PathsPortFileProvider& provider,
BinaryCache& binary_cache,
const CMakeVars::CMakeVarProvider& cmake_vars,
ActionPlan action_plan,
DryRun dry_run,
Expand Down
Loading