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

Fix CI crash by ensuring the "core" feature is installed for all ports. #329

Merged
merged 1 commit into from
Jan 27, 2022
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
2 changes: 0 additions & 2 deletions include/vcpkg/packagespec.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<PackageSpec> to_package_specs(const std::vector<std::string>& ports, Triplet triplet);

const std::string& name() const;

Triplet triplet() const;
Expand Down
13 changes: 9 additions & 4 deletions src/vcpkg/commands.ci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,18 +517,23 @@ namespace vcpkg::Commands::CI

XunitTestResults xunitTestResults;

std::vector<std::string> all_ports =
Util::fmap(provider.load_all_control_files(), Paragraphs::get_name_of_control_file);
std::vector<TripletAndSummary> results;
auto timer = ElapsedTimer::create_started();

Input::check_triplet(target_triplet, paths);

xunitTestResults.push_collection(target_triplet.canonical_name());

std::vector<PackageSpec> specs = PackageSpec::to_package_specs(all_ports, target_triplet);
std::vector<std::string> 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<FullPackageSpec> 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);
Expand Down
7 changes: 0 additions & 7 deletions src/vcpkg/packagespec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ namespace vcpkg
}
}

std::vector<PackageSpec> PackageSpec::to_package_specs(const std::vector<std::string>& 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; }
Expand Down