diff --git a/include/vcpkg/packagespec.h b/include/vcpkg/packagespec.h index a5f3213a00..e07927e889 100644 --- a/include/vcpkg/packagespec.h +++ b/include/vcpkg/packagespec.h @@ -27,8 +27,6 @@ namespace vcpkg PackageSpec() = default; PackageSpec(std::string name, Triplet triplet) : m_name(std::move(name)), m_triplet(triplet) { } - static std::vector to_package_specs(const std::vector& ports, Triplet triplet); - const std::string& name() const; Triplet triplet() const; diff --git a/src/vcpkg/commands.ci.cpp b/src/vcpkg/commands.ci.cpp index 63845d82ea..8aaea33132 100644 --- a/src/vcpkg/commands.ci.cpp +++ b/src/vcpkg/commands.ci.cpp @@ -517,8 +517,6 @@ namespace vcpkg::Commands::CI XunitTestResults xunitTestResults; - std::vector all_ports = - Util::fmap(provider.load_all_control_files(), Paragraphs::get_name_of_control_file); std::vector results; auto timer = ElapsedTimer::create_started(); @@ -526,9 +524,16 @@ namespace vcpkg::Commands::CI xunitTestResults.push_collection(target_triplet.canonical_name()); - std::vector specs = PackageSpec::to_package_specs(all_ports, target_triplet); + std::vector all_port_names = + Util::fmap(provider.load_all_control_files(), Paragraphs::get_name_of_control_file); // Install the default features for every package - auto all_default_full_specs = Util::fmap(specs, [&](auto& spec) { return FullPackageSpec{spec, {"default"}}; }); + std::vector all_default_full_specs; + all_default_full_specs.reserve(all_port_names.size()); + for (auto&& port_name : all_port_names) + { + all_default_full_specs.emplace_back(PackageSpec{std::move(port_name), target_triplet}, + InternalFeatureSet{"core", "default"}); + } Dependencies::CreateInstallPlanOptions serialize_options(host_triplet, Dependencies::UnsupportedPortAction::Warn); diff --git a/src/vcpkg/packagespec.cpp b/src/vcpkg/packagespec.cpp index 587ed72e74..5dce0b8fcc 100644 --- a/src/vcpkg/packagespec.cpp +++ b/src/vcpkg/packagespec.cpp @@ -28,13 +28,6 @@ namespace vcpkg } } - std::vector PackageSpec::to_package_specs(const std::vector& ports, Triplet triplet) - { - return Util::fmap(ports, [&](const std::string& spec_as_string) -> PackageSpec { - return {spec_as_string, triplet}; - }); - } - const std::string& PackageSpec::name() const { return this->m_name; } Triplet PackageSpec::triplet() const { return this->m_triplet; }