PackageSpec.target_triplet() -> ".triplet()
MODIFY
include/PackageSpec.h
include/PackageSpec.h
@@ -13,7 +13,7 @@ namespace vcpkg
const std::string& name() const;
- const Triplet& target_triplet() const;
+ const Triplet& triplet() const;
std::string dir() const;
@@ -36,7 +36,7 @@ namespace std
{
size_t hash = 17;
hash = hash * 31 + std::hash<std::string>()(value.name());
- hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.target_triplet());
+ hash = hash * 31 + std::hash<vcpkg::Triplet>()(value.triplet());
return hash;
}
};

MODIFY
include/StatusParagraphs.h
include/StatusParagraphs.h
@@ -16,14 +16,14 @@ namespace vcpkg
const_iterator find(const PackageSpec& spec) const
{
- return find(spec.name(), spec.target_triplet());
+ return find(spec.name(), spec.triplet());
}
const_iterator find(const std::string& name, const Triplet& target_triplet) const;
iterator find(const std::string& name, const Triplet& target_triplet);
const_iterator find_installed(const PackageSpec& spec) const
{
- return find_installed(spec.name(), spec.target_triplet());
+ return find_installed(spec.name(), spec.triplet());
}
const_iterator find_installed(const std::string& name, const Triplet& target_triplet) const;

MODIFY
src/BinaryParagraph.cpp
src/BinaryParagraph.cpp
@@ -65,7 +65,7 @@ namespace vcpkg
std::string BinaryParagraph::fullstem() const
{
- return Strings::format("%s_%s_%s", this->spec.name(), this->version, this->spec.target_triplet());
+ return Strings::format("%s_%s_%s", this->spec.name(), this->version, this->spec.triplet());
}
std::ostream& operator<<(std::ostream& os, const BinaryParagraph& p)
@@ -85,7 +85,7 @@ namespace vcpkg
os << "\n";
}
- os << "Architecture: " << p.spec.target_triplet().to_string() << "\n";
+ os << "Architecture: " << p.spec.triplet().to_string() << "\n";
os << "Multi-Arch: same\n";
if (!p.maintainer.empty())
os << "Maintainer: " << p.maintainer << "\n";

MODIFY
src/PackageSpec.cpp
src/PackageSpec.cpp
@@ -45,7 +45,7 @@ namespace vcpkg
return this->m_name;
}
- const Triplet& PackageSpec::target_triplet() const
+ const Triplet& PackageSpec::triplet() const
{
return this->m_target_triplet;
}
@@ -57,11 +57,11 @@ namespace vcpkg
std::string PackageSpec::to_string() const
{
- return Strings::format("%s:%s", this->name(), this->target_triplet());
+ return Strings::format("%s:%s", this->name(), this->triplet());
}
bool operator==(const PackageSpec& left, const PackageSpec& right)
{
- return left.name() == right.name() && left.target_triplet() == right.target_triplet();
+ return left.name() == right.name() && left.triplet() == right.triplet();
}
}

MODIFY
src/PostBuildLint.cpp
src/PostBuildLint.cpp
@@ -658,7 +658,7 @@ namespace vcpkg::PostBuildLint
libs.insert(libs.cend(), debug_libs.cbegin(), debug_libs.cend());
libs.insert(libs.cend(), release_libs.cbegin(), release_libs.cend());
- error_count += check_lib_architecture(spec.target_triplet().architecture(), libs);
+ error_count += check_lib_architecture(spec.triplet().architecture(), libs);
switch (build_info.library_linkage)
{
@@ -677,8 +677,8 @@ namespace vcpkg::PostBuildLint
dlls.insert(dlls.cend(), release_dlls.cbegin(), release_dlls.cend());
error_count += check_exports_of_dlls(dlls, toolset.dumpbin);
- error_count += check_uwp_bit_of_dlls(spec.target_triplet().system(), dlls, toolset.dumpbin);
- error_count += check_dll_architecture(spec.target_triplet().architecture(), dlls);
+ error_count += check_uwp_bit_of_dlls(spec.triplet().system(), dlls, toolset.dumpbin);
+ error_count += check_dll_architecture(spec.triplet().architecture(), dlls);
error_count += check_outdated_crt_linkage_of_dlls(dlls, toolset.dumpbin);
break;

MODIFY
src/StatusParagraphs.cpp
src/StatusParagraphs.cpp
@@ -16,7 +16,7 @@ namespace vcpkg
return std::find_if(begin(), end(), [&](const std::unique_ptr<StatusParagraph>& pgh)
{
const PackageSpec& spec = pgh->package.spec;
- return spec.name() == name && spec.target_triplet() == target_triplet;
+ return spec.name() == name && spec.triplet() == target_triplet;
});
}
@@ -25,7 +25,7 @@ namespace vcpkg
return std::find_if(begin(), end(), [&](const std::unique_ptr<StatusParagraph>& pgh)
{
const PackageSpec& spec = pgh->package.spec;
- return spec.name() == name && spec.target_triplet() == target_triplet;
+ return spec.name() == name && spec.triplet() == target_triplet;
});
}
@@ -44,7 +44,7 @@ namespace vcpkg
{
Checks::check_exit(VCPKG_LINE_INFO, pgh != nullptr, "Inserted null paragraph");
const PackageSpec& spec = pgh->package.spec;
- auto ptr = find(spec.name(), spec.target_triplet());
+ auto ptr = find(spec.name(), spec.triplet());
if (ptr == end())
{
paragraphs.push_back(std::move(pgh));

MODIFY
src/commands_build.cpp
src/commands_build.cpp
@@ -40,7 +40,7 @@ namespace vcpkg::Commands::Build
{
Checks::check_exit(VCPKG_LINE_INFO, spec.name() == source_paragraph.name, "inconsistent arguments to build_package()");
- const Triplet& target_triplet = spec.target_triplet();
+ const Triplet& target_triplet = spec.triplet();
for (auto&& dep : filter_dependencies(source_paragraph.depends, target_triplet))
{
if (status_db.find_installed(dep, target_triplet) == status_db.end())
@@ -183,7 +183,7 @@ namespace vcpkg::Commands::Build
static const std::string example = Commands::Help::create_example_string("build zlib:x64-windows");
args.check_exact_arg_count(1, example); // Build only takes a single package and all dependencies must already be installed
const PackageSpec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_triplet, example);
- Input::check_triplet(spec.target_triplet(), paths);
+ Input::check_triplet(spec.triplet(), paths);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({ OPTION_CHECKS_ONLY });
perform_and_exit(spec, paths.port_dir(spec), options, paths);
}

MODIFY
src/commands_build_external.cpp
src/commands_build_external.cpp
@@ -10,7 +10,7 @@ namespace vcpkg::Commands::BuildExternal
static const std::string example = Commands::Help::create_example_string(R"(build_external zlib2 C:\path\to\dir\with\controlfile\)");
args.check_exact_arg_count(2, example);
const PackageSpec spec = Input::check_and_get_package_spec(args.command_arguments.at(0), default_triplet, example);
- Input::check_triplet(spec.target_triplet(), paths);
+ Input::check_triplet(spec.triplet(), paths);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({});
const fs::path port_dir = args.command_arguments.at(1);

MODIFY
src/commands_install.cpp
src/commands_install.cpp
@@ -22,7 +22,7 @@ namespace vcpkg::Commands::Install
const fs::path package_prefix_path = paths.package_dir(bpgh.spec);
const size_t prefix_length = package_prefix_path.native().size();
- const Triplet& target_triplet = bpgh.spec.target_triplet();
+ const Triplet& target_triplet = bpgh.spec.triplet();
const std::string& triplet_subfolder = target_triplet.canonical_name();
const fs::path triplet_subfolder_path = paths.installed / triplet_subfolder;
std::error_code ec;
@@ -103,7 +103,7 @@ namespace vcpkg::Commands::Install
std::vector<std::string> output;
for (const StatusParagraphAndAssociatedFiles& t : pgh_and_files)
{
- if (t.pgh.package.spec.target_triplet() != triplet)
+ if (t.pgh.package.spec.triplet() != triplet)
{
continue;
}
@@ -186,7 +186,7 @@ namespace vcpkg::Commands::Install
void install_package(const VcpkgPaths& paths, const BinaryParagraph& binary_paragraph, StatusParagraphs* status_db)
{
const fs::path package_dir = paths.package_dir(binary_paragraph.spec);
- const Triplet& triplet = binary_paragraph.spec.target_triplet();
+ const Triplet& triplet = binary_paragraph.spec.triplet();
const std::vector<StatusParagraphAndAssociatedFiles> pgh_and_files = get_installed_files(paths, *status_db);
const SortedVector<std::string> package_files = build_list_of_package_files(package_dir);
@@ -215,7 +215,7 @@ namespace vcpkg::Commands::Install
spgh.state = InstallState::HALF_INSTALLED;
for (auto&& dep : spgh.package.depends)
{
- if (status_db->find_installed(dep, spgh.package.spec.target_triplet()) == status_db->end())
+ if (status_db->find_installed(dep, spgh.package.spec.triplet()) == status_db->end())
{
Checks::unreachable(VCPKG_LINE_INFO);
}
@@ -243,7 +243,7 @@ namespace vcpkg::Commands::Install
return Input::check_and_get_package_spec(arg, default_triplet, example);
});
for (auto&& spec : specs)
- Input::check_triplet(spec.target_triplet(), paths);
+ Input::check_triplet(spec.triplet(), paths);
const std::unordered_set<std::string> options = args.check_and_get_optional_command_arguments({ OPTION_DRY_RUN });
const bool dryRun = options.find(OPTION_DRY_RUN) != options.cend();

MODIFY
src/commands_remove.cpp
src/commands_remove.cpp
@@ -29,7 +29,7 @@ namespace vcpkg::Commands::Remove
static void remove_package(const VcpkgPaths& paths, const PackageSpec& spec, StatusParagraphs* status_db)
{
- StatusParagraph& pkg = **status_db->find(spec.name(), spec.target_triplet());
+ StatusParagraph& pkg = **status_db->find(spec.name(), spec.triplet());
pkg.want = Want::PURGE;
pkg.state = InstallState::HALF_INSTALLED;
@@ -158,7 +158,7 @@ namespace vcpkg::Commands::Remove
args.check_min_arg_count(1, example);
specs = Util::fmap(args.command_arguments, [&](auto&& arg) { return Input::check_and_get_package_spec(arg, default_triplet, example); });
for (auto&& spec : specs)
- Input::check_triplet(spec.target_triplet(), paths);
+ Input::check_triplet(spec.triplet(), paths);
}
const bool alsoRemoveFolderFromPackages = options.find(OPTION_NO_PURGE) == options.end();

MODIFY
src/tests_paragraph.cpp
src/tests_paragraph.cpp
@@ -111,7 +111,7 @@ namespace UnitTest1
Assert::AreEqual("1.2.8", pgh.version.c_str());
Assert::AreEqual("", pgh.maintainer.c_str());
Assert::AreEqual("", pgh.description.c_str());
- Assert::AreEqual("x86-windows", pgh.spec.target_triplet().canonical_name().c_str());
+ Assert::AreEqual("x86-windows", pgh.spec.triplet().canonical_name().c_str());
Assert::AreEqual(size_t(0), pgh.depends.size());
}
@@ -363,7 +363,7 @@ namespace UnitTest1
vcpkg::Expected<vcpkg::PackageSpec> spec = vcpkg::PackageSpec::from_string("zlib", vcpkg::Triplet::X86_WINDOWS);
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, vcpkg::to_package_spec_parse_result(spec.error_code()));
Assert::AreEqual("zlib", spec.get()->name().c_str());
- Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), spec.get()->target_triplet().canonical_name());
+ Assert::AreEqual(vcpkg::Triplet::X86_WINDOWS.canonical_name(), spec.get()->triplet().canonical_name());
}
TEST_METHOD(package_spec_parse_with_arch)
@@ -371,7 +371,7 @@ namespace UnitTest1
vcpkg::Expected<vcpkg::PackageSpec> spec = vcpkg::PackageSpec::from_string("zlib:x64-uwp", vcpkg::Triplet::X86_WINDOWS);
Assert::AreEqual(vcpkg::PackageSpecParseResult::SUCCESS, vcpkg::to_package_spec_parse_result(spec.error_code()));
Assert::AreEqual("zlib", spec.get()->name().c_str());
- Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), spec.get()->target_triplet().canonical_name());
+ Assert::AreEqual(vcpkg::Triplet::X64_UWP.canonical_name(), spec.get()->triplet().canonical_name());
}
TEST_METHOD(package_spec_parse_with_multiple_colon)

MODIFY
src/vcpkg_Dependencies.cpp
src/vcpkg_Dependencies.cpp
@@ -69,7 +69,7 @@ namespace vcpkg::Dependencies
{
for (const std::string& dep_as_string : dependencies_as_string)
{
- const PackageSpec current_dep = PackageSpec::from_name_and_triplet(dep_as_string, spec.target_triplet()).value_or_exit(VCPKG_LINE_INFO);
+ const PackageSpec current_dep = PackageSpec::from_name_and_triplet(dep_as_string, spec.triplet()).value_or_exit(VCPKG_LINE_INFO);
auto it = status_db.find_installed(current_dep);
if (it != status_db.end())
{
@@ -103,7 +103,7 @@ namespace vcpkg::Dependencies
Expected<SourceParagraph> maybe_spgh = Paragraphs::try_load_port(paths.port_dir(spec));
if (auto spgh = maybe_spgh.get())
{
- process_dependencies(filter_dependencies(spgh->depends, spec.target_triplet()));
+ process_dependencies(filter_dependencies(spgh->depends, spec.triplet()));
was_examined.emplace(spec, InstallPlanAction{ InstallPlanType::BUILD_AND_INSTALL, request_type, nullopt, std::move(*spgh) });
}
else
@@ -152,7 +152,7 @@ namespace vcpkg::Dependencies
{
if (an_installed_package->want != Want::INSTALL)
continue;
- if (an_installed_package->package.spec.target_triplet() != spec.target_triplet())
+ if (an_installed_package->package.spec.triplet() != spec.triplet())
continue;
const std::vector<std::string>& deps = an_installed_package->package.depends;

PackageSpec.target_triplet() -> ".triplet()