Skip to content

Commit

Permalink
Attempt to fix CI crash by ensuring the "core" feature is installed f…
Browse files Browse the repository at this point in the history
…or all ports. (#329)
  • Loading branch information
BillyONeal authored Jan 27, 2022
1 parent e49443d commit fcff088
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
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

0 comments on commit fcff088

Please sign in to comment.