Skip to content
Open
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
2 changes: 1 addition & 1 deletion include/vcpkg-test/mockcmakevarprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace vcpkg::Test
using SMap = std::unordered_map<std::string, std::string>;
void load_generic_triplet_vars(Triplet triplet) const override;
void load_dep_info_vars(View<PackageSpec> specs, Triplet) const override;
void load_tag_vars(View<FullPackageSpec> specs, View<Path> port_locations, Triplet host_triplet) const override;
void load_tag_vars(View<FullPackageSpec> specs, Triplet host_triplet) const override;
Optional<const SMap&> get_generic_triplet_vars(Triplet triplet) const override;
Optional<const SMap&> get_dep_info_vars(const PackageSpec& spec) const override;
Optional<const SMap&> get_tag_vars(const PackageSpec& spec) const override;
Expand Down
2 changes: 0 additions & 2 deletions include/vcpkg/base/contractual-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ namespace vcpkg
inline constexpr StringLiteral CMakeVariablePortConfigs = "VCPKG_PORT_CONFIGS";
inline constexpr StringLiteral CMakeVariablePostPortfileIncludes = "VCPKG_POST_PORTFILE_INCLUDES";
inline constexpr StringLiteral CMakeVariableProhibitBackcompatFeatures = "_VCPKG_PROHIBIT_BACKCOMPAT_FEATURES";
inline constexpr StringLiteral CMakeVariablePublicAbiOverride = "VCPKG_PUBLIC_ABI_OVERRIDE";
inline constexpr StringLiteral CMakeVariableRef = "REF";
inline constexpr StringLiteral CMakeVariableRepo = "REPO";
inline constexpr StringLiteral CMakeVariableSHA512 = "SHA512";
Expand Down Expand Up @@ -580,7 +579,6 @@ namespace vcpkg
inline constexpr StringLiteral AbiTagPortsDotCMake = "ports.cmake";
inline constexpr StringLiteral AbiTagPostBuildChecks = "post_build_checks";
inline constexpr StringLiteral AbiTagPowershell = "powershell";
inline constexpr StringLiteral AbiTagPublicAbiOverride = "public_abi_override";
inline constexpr StringLiteral AbiTagSbomInfo = "sbom_info";

inline constexpr StringLiteral StatusDeinstall = "deinstall";
Expand Down
2 changes: 0 additions & 2 deletions include/vcpkg/base/message-data.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1236,8 +1236,6 @@ DECLARE_MESSAGE(ErrorWhileParsing, (msg::path), "", "Errors occurred while parsi
DECLARE_MESSAGE(ErrorWhileWriting, (msg::path), "", "Error occurred while writing {path}.")
DECLARE_MESSAGE(ExamplesHeader, (), "Printed before a list of example command lines", "Examples:")
DECLARE_MESSAGE(ExceededRecursionDepth, (), "", "Recursion depth exceeded.")
DECLARE_MESSAGE(ExcludedPackage, (msg::spec), "", "Excluded {spec}")
DECLARE_MESSAGE(ExcludedPackages, (), "", "The following packages are excluded:")
DECLARE_MESSAGE(ExecutablesRelativeToThePackageDirectoryHere,
(),
"",
Expand Down
2 changes: 1 addition & 1 deletion include/vcpkg/binaryparagraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace vcpkg
BinaryParagraph(const SourceParagraph& spgh,
const std::vector<std::string>& default_features,
Triplet triplet,
const std::string& abi_tag,
StringView abi_tag,
std::vector<PackageSpec> deps);
BinaryParagraph(const PackageSpec& spec, const FeatureParagraph& fpgh, std::vector<PackageSpec> deps);

Expand Down
4 changes: 1 addition & 3 deletions include/vcpkg/cmakevars.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ namespace vcpkg::CMakeVars

virtual void load_dep_info_vars(View<PackageSpec> specs, Triplet host_triplet) const = 0;

virtual void load_tag_vars(View<FullPackageSpec> specs,
View<Path> port_locations,
Triplet host_triplet) const = 0;
virtual void load_tag_vars(View<FullPackageSpec> specs, Triplet host_triplet) const = 0;

void load_tag_vars(const ActionPlan& action_plan, Triplet host_triplet) const;
};
Expand Down
4 changes: 3 additions & 1 deletion include/vcpkg/commands.build.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ namespace vcpkg
Optional<Path> visual_studio_path;
Optional<Path> external_toolchain_file;
Optional<ConfigurationType> build_type;
Optional<std::string> public_abi_override;
std::vector<std::string> passthrough_env_vars;
std::vector<std::string> passthrough_env_vars_tracked;
std::vector<Path> hash_additional_files;
Expand Down Expand Up @@ -302,6 +301,9 @@ namespace vcpkg
std::vector<Json::Object> heuristic_resources;
};

// It is important that `status_db` is the same status database as was used when constructing `action_plan`. Note
// that this is expected to be a default constructed / empty StatusParagraphs for the "versioned" install plan types
// as they always start from a clean state.
void compute_all_abis(const VcpkgPaths& paths,
ActionPlan& action_plan,
const CMakeVars::CMakeVarProvider& var_provider,
Expand Down
5 changes: 1 addition & 4 deletions include/vcpkg/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@ namespace vcpkg
std::vector<LocalizedString>&& build_failure_messages,
std::vector<std::string> default_features);

const std::string& public_abi() const;
bool has_package_abi() const;
const std::string* package_abi() const;
const std::string& package_abi_or_exit(LineInfo li) const;
ZStringView package_abi_or_empty() const;
const PreBuildInfo& pre_build_info(LineInfo li) const;
Version version() const;
std::string display_name() const;
Expand All @@ -66,7 +65,6 @@ namespace vcpkg
Optional<InstalledPackageView> installed_package;
Optional<std::vector<std::string>> default_features;

InstallPlanType plan_type;
RequestType request_type;
UseHeadVersion use_head_version;
Editable editable;
Expand Down Expand Up @@ -120,7 +118,6 @@ namespace vcpkg

ExportPlanAction(const PackageSpec& spec, RequestType request_type);

ExportPlanType plan_type;
RequestType request_type;

Optional<const BinaryParagraph&> core_paragraph() const;
Expand Down
15 changes: 0 additions & 15 deletions include/vcpkg/fwd/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,6 @@ namespace vcpkg
AUTO_SELECTED
};

enum class InstallPlanType
{
UNKNOWN,
BUILD_AND_INSTALL,
ALREADY_INSTALLED,
EXCLUDED
};

enum class ExportPlanType
{
UNKNOWN,
NOT_BUILT,
ALREADY_BUILT
};

struct BasicAction;
struct PackageAction;
struct InstallPlanAction;
Expand Down
3 changes: 0 additions & 3 deletions locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -725,9 +725,6 @@
"ExamplesHeader": "Examples:",
"_ExamplesHeader.comment": "Printed before a list of example command lines",
"ExceededRecursionDepth": "Recursion depth exceeded.",
"ExcludedPackage": "Excluded {spec}",
"_ExcludedPackage.comment": "An example of {spec} is zlib:x64-windows.",
"ExcludedPackages": "The following packages are excluded:",
"ExecutablesRelativeToThePackageDirectoryHere": "the executables are relative to ${{CURRENT_PACKAGES_DIR}} here",
"ExpectedAnObject": "expected an object",
"ExpectedAtMostOneSetOfTags": "Found {count} sets of {old_value}.*{new_value} but expected at most 1, in block:\n{value}",
Expand Down
2 changes: 1 addition & 1 deletion src/vcpkg-test/binarycaching.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct KnowNothingBinaryProvider : IReadBinaryProvider
REQUIRE(actions.size() == out_status.size());
for (size_t idx = 0; idx < out_status.size(); ++idx)
{
CHECK(actions[idx]->has_package_abi());
CHECK(actions[idx]->package_abi());
CHECK(out_status[idx] == RestoreResult::unavailable);
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/vcpkg-test/dependencies.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2424,9 +2424,6 @@ TEST_CASE ("formatting plan 1", "[dependencies]")
{});
InstallPlanAction install_c(
{"c", Test::X64_OSX}, scfl_c, pr, RequestType::USER_REQUESTED, UseHeadVersion::No, Editable::No, {}, {}, {});
InstallPlanAction install_f(
{"f", Test::X64_OSX}, scfl_f, pr, RequestType::USER_REQUESTED, UseHeadVersion::No, Editable::No, {}, {}, {});
install_f.plan_type = InstallPlanType::EXCLUDED;

InstallPlanAction already_installed_d(
status_db.get_installed_package_view({"d", Test::X86_WINDOWS}).value_or_exit(VCPKG_LINE_INFO),
Expand All @@ -2440,6 +2437,9 @@ TEST_CASE ("formatting plan 1", "[dependencies]")
UseHeadVersion::No,
Editable::No);

InstallPlanAction install_f(
{"f", Test::X64_OSX}, scfl_f, pr, RequestType::USER_REQUESTED, UseHeadVersion::No, Editable::No, {}, {}, {});

ActionPlan plan;
{
auto formatted = format_plan(plan);
Expand Down Expand Up @@ -2505,15 +2505,15 @@ TEST_CASE ("formatting plan 1", "[dependencies]")

plan.install_actions.push_back(std::move(install_f));
REQUIRE_LINES(format_plan(plan).all_text(),
"The following packages are excluded:\n"
" f:x64-osx@1 -- git+https://github.com/microsoft/vcpkg:f54a99d43e600ceea175205850560f6dd37ea6cf\n"
"The following packages are already installed:\n"
" * d:x86-windows@1\n"
" e:x86-windows@1\n"
"The following packages will be rebuilt:\n"
" * a:x64-osx@1\n"
" * b[1]:x64-osx@1\n"
" c:x64-osx@1 -- c\n"
"The following packages will be built and installed:\n"
" f:x64-osx@1 -- git+https://github.com/microsoft/vcpkg:f54a99d43e600ceea175205850560f6dd37ea6cf\n"
"Additional packages (*) will be modified to complete this operation.\n");
}

Expand Down
5 changes: 1 addition & 4 deletions src/vcpkg-test/mockcmakevarsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,8 @@ namespace vcpkg::Test
}
}

void MockCMakeVarProvider::load_tag_vars(View<FullPackageSpec> specs,
View<Path> port_locations,
Triplet host_triplet) const
void MockCMakeVarProvider::load_tag_vars(View<FullPackageSpec> specs, Triplet host_triplet) const
{
(void)port_locations;
(void)host_triplet;
for (auto&& spec : specs)
{
Expand Down
20 changes: 10 additions & 10 deletions src/vcpkg-test/plan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ TEST_CASE ("existing package scheme", "[plan]")
REQUIRE(install_plan.size() == 1);
const auto p = &install_plan.already_installed.at(0);
REQUIRE(p->spec.name() == "a");
REQUIRE(p->plan_type == InstallPlanType::ALREADY_INSTALLED);
REQUIRE(p->installed_package.has_value());
REQUIRE(p->request_type == RequestType::USER_REQUESTED);
}

Expand All @@ -201,12 +201,12 @@ TEST_CASE ("user requested package scheme", "[plan]")
REQUIRE(install_plan.size() == 2);
const auto p = &install_plan.install_actions.at(0);
REQUIRE(p->spec.name() == "b");
REQUIRE(p->plan_type == InstallPlanType::BUILD_AND_INSTALL);
REQUIRE(!p->installed_package.has_value());
REQUIRE(p->request_type == RequestType::AUTO_SELECTED);

const auto p2 = &install_plan.install_actions.at(1);
REQUIRE(p2->spec.name() == "a");
REQUIRE(p2->plan_type == InstallPlanType::BUILD_AND_INSTALL);
REQUIRE(!p2->installed_package.has_value());
REQUIRE(p2->request_type == RequestType::USER_REQUESTED);
}

Expand Down Expand Up @@ -1413,7 +1413,7 @@ TEST_CASE ("basic export scheme", "[plan]")

REQUIRE(plan.size() == 1);
REQUIRE(plan.at(0).spec.name() == "a");
REQUIRE(plan.at(0).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(0).core_paragraph().has_value());
}

TEST_CASE ("basic export scheme with recurse", "[plan]")
Expand All @@ -1431,10 +1431,10 @@ TEST_CASE ("basic export scheme with recurse", "[plan]")

REQUIRE(plan.size() == 2);
REQUIRE(plan.at(0).spec.name() == "a");
REQUIRE(plan.at(0).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(0).core_paragraph().has_value());

REQUIRE(plan.at(1).spec.name() == "b");
REQUIRE(plan.at(1).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(1).core_paragraph().has_value());
}

TEST_CASE ("basic export scheme with bystander", "[plan]")
Expand All @@ -1452,7 +1452,7 @@ TEST_CASE ("basic export scheme with bystander", "[plan]")

REQUIRE(plan.size() == 1);
REQUIRE(plan.at(0).spec.name() == "a");
REQUIRE(plan.at(0).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(0).core_paragraph().has_value());
}

TEST_CASE ("basic export scheme with missing", "[plan]")
Expand All @@ -1466,7 +1466,7 @@ TEST_CASE ("basic export scheme with missing", "[plan]")

REQUIRE(plan.size() == 1);
REQUIRE(plan.at(0).spec.name() == "a");
REQUIRE(plan.at(0).plan_type == ExportPlanType::NOT_BUILT);
REQUIRE(!plan.at(0).core_paragraph().has_value());
}

TEST_CASE ("basic export scheme with features", "[plan]")
Expand All @@ -1485,8 +1485,8 @@ TEST_CASE ("basic export scheme with features", "[plan]")
REQUIRE(plan.size() == 2);

REQUIRE(plan.at(0).spec.name() == "b");
REQUIRE(plan.at(0).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(0).core_paragraph().has_value());

REQUIRE(plan.at(1).spec.name() == "a");
REQUIRE(plan.at(1).plan_type == ExportPlanType::ALREADY_BUILT);
REQUIRE(plan.at(1).core_paragraph().has_value());
}
4 changes: 2 additions & 2 deletions src/vcpkg/binaryparagraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace vcpkg
BinaryParagraph::BinaryParagraph(const SourceParagraph& spgh,
const std::vector<std::string>& default_features,
Triplet triplet,
const std::string& abi_tag,
StringView abi_tag,
std::vector<PackageSpec> deps)
: spec(spgh.name, triplet)
, version(spgh.version)
Expand All @@ -101,7 +101,7 @@ namespace vcpkg
, feature()
, default_features(default_features)
, dependencies(std::move(deps))
, abi(abi_tag)
, abi(abi_tag.data(), abi_tag.size())
{
canonicalize();
}
Expand Down
Loading
Loading