Delete --x-use-aria2. (#1582)
* Huge parts of the vcpkg product do not respect this setting * https://github.com/microsoft/vcpkg/issues/30079 shows it has been entirely broken for an extremely long time. * It's an --x switch and we never claimed full support for it. * We have never tested that it ever actually works. Related: https://github.com/microsoft/vcpkg-docs/pull/441
This commit is contained in:
Родитель
f0be9732c5
Коммит
c79ccaa466
|
@ -39,7 +39,7 @@ BeforeAll {
|
|||
'--clean-downloads-after-build', '--clean-packages-after-build', '--dry-run', '--editable'
|
||||
'--enforce-port-checks', '--head', '--keep-going', '--no-downloads', '--no-print-usage'
|
||||
'--only-binarycaching', '--only-downloads', '--recurse', '--x-feature', '--x-no-default-features'
|
||||
'--x-prohibit-backcompat-features', '--x-use-aria2', '--x-write-nuget-packages-config', '--x-xunit'
|
||||
'--x-prohibit-backcompat-features', '--x-write-nuget-packages-config', '--x-xunit'
|
||||
)
|
||||
remove = @(
|
||||
'--dry-run', '--outdated', '--purge', '--recurse'
|
||||
|
|
|
@ -321,7 +321,6 @@ namespace vcpkg
|
|||
inline constexpr StringLiteral SwitchXProhibitBackcompatFeatures = "x-prohibit-backcompat-features";
|
||||
inline constexpr StringLiteral SwitchXRandomize = "x-randomize";
|
||||
inline constexpr StringLiteral SwitchXTransitive = "x-transitive";
|
||||
inline constexpr StringLiteral SwitchXUseAria2 = "x-use-aria2";
|
||||
inline constexpr StringLiteral SwitchXVersionSuffix = "x-version-suffix";
|
||||
inline constexpr StringLiteral SwitchXWriteNuGetPackagesConfig = "x-write-nuget-packages-config";
|
||||
inline constexpr StringLiteral SwitchXXUnit = "x-xunit";
|
||||
|
@ -388,7 +387,6 @@ namespace vcpkg
|
|||
inline constexpr StringLiteral CMakeVariableDisableCompilerTracking = "VCPKG_DISABLE_COMPILER_TRACKING";
|
||||
inline constexpr StringLiteral CMakeVariableDownloadMode = "VCPKG_DOWNLOAD_MODE";
|
||||
inline constexpr StringLiteral CMakeVariableDownloads = "DOWNLOADS";
|
||||
inline constexpr StringLiteral CMakeVariableDownloadTool = "_VCPKG_DOWNLOAD_TOOL";
|
||||
inline constexpr StringLiteral CMakeVariableEditable = "_VCPKG_EDITABLE";
|
||||
inline constexpr StringLiteral CMakeVariableEnvPassthrough = "VCPKG_ENV_PASSTHROUGH";
|
||||
inline constexpr StringLiteral CMakeVariableEnvPassthroughUntracked = "VCPKG_ENV_PASSTHROUGH_UNTRACKED";
|
||||
|
|
|
@ -47,7 +47,7 @@ DECLARE_MSG_ARG(sha,
|
|||
DECLARE_MSG_ARG(supports_expression, "windows & !static")
|
||||
DECLARE_MSG_ARG(system_api, "CreateProcessW")
|
||||
DECLARE_MSG_ARG(system_name, "Darwin")
|
||||
DECLARE_MSG_ARG(tool_name, "aria2")
|
||||
DECLARE_MSG_ARG(tool_name, "signtool")
|
||||
DECLARE_MSG_ARG(triplet, "x64-windows")
|
||||
DECLARE_MSG_ARG(upper, "42")
|
||||
DECLARE_MSG_ARG(url, "https://github.com/microsoft/vcpkg")
|
||||
|
|
|
@ -1740,7 +1740,6 @@ DECLARE_MESSAGE(HelpTxtOptNoUsage, (), "", "Does not print CMake usage informati
|
|||
DECLARE_MESSAGE(HelpTxtOptOnlyBinCache, (), "", "Fails if cached binaries are not available")
|
||||
DECLARE_MESSAGE(HelpTxtOptOnlyDownloads, (), "", "Makes best-effort attempt to download sources without building")
|
||||
DECLARE_MESSAGE(HelpTxtOptRecurse, (), "", "Allows removal of packages as part of installation")
|
||||
DECLARE_MESSAGE(HelpTxtOptUseAria2, (), "", "Uses aria2 to perform download tasks")
|
||||
DECLARE_MESSAGE(HelpTxtOptUseHeadVersion,
|
||||
(),
|
||||
"",
|
||||
|
|
|
@ -59,9 +59,6 @@ namespace vcpkg
|
|||
Triplet default_triplet,
|
||||
Triplet host_triplet);
|
||||
|
||||
StringLiteral to_string_view(DownloadTool tool);
|
||||
std::string to_string(DownloadTool tool);
|
||||
|
||||
struct BuildPackageOptions
|
||||
{
|
||||
BuildMissing build_missing;
|
||||
|
@ -70,7 +67,6 @@ namespace vcpkg
|
|||
CleanBuildtrees clean_buildtrees;
|
||||
CleanPackages clean_packages;
|
||||
CleanDownloads clean_downloads;
|
||||
DownloadTool download_tool;
|
||||
BackcompatFeatures backcompat_features;
|
||||
KeepGoing keep_going;
|
||||
};
|
||||
|
|
|
@ -57,12 +57,6 @@ namespace vcpkg
|
|||
Release,
|
||||
};
|
||||
|
||||
enum class DownloadTool
|
||||
{
|
||||
Builtin,
|
||||
Aria2,
|
||||
};
|
||||
|
||||
enum class Editable
|
||||
{
|
||||
No = 0,
|
||||
|
|
|
@ -29,7 +29,6 @@ namespace vcpkg
|
|||
static constexpr StringLiteral NINJA = "ninja";
|
||||
static constexpr StringLiteral POWERSHELL_CORE = "powershell-core";
|
||||
static constexpr StringLiteral NUGET = "nuget";
|
||||
static constexpr StringLiteral ARIA2 = "aria2";
|
||||
static constexpr StringLiteral NODE = "node";
|
||||
static constexpr StringLiteral IFW_INSTALLER_BASE = "ifw_installerbase";
|
||||
// This duplicate of CMake should only be used as a fallback to unpack
|
||||
|
|
|
@ -649,7 +649,7 @@
|
|||
"DownloadingFileFirstAuthoritativeSource": "Downloading {path}, trying {url}",
|
||||
"_DownloadingFileFirstAuthoritativeSource.comment": "An example of {path} is /foo/bar. An example of {url} is https://github.com/microsoft/vcpkg.",
|
||||
"DownloadingPortableToolVersionX": "A suitable version of {tool_name} was not found (required v{version}).",
|
||||
"_DownloadingPortableToolVersionX.comment": "An example of {tool_name} is aria2. An example of {version} is 1.3.8.",
|
||||
"_DownloadingPortableToolVersionX.comment": "An example of {tool_name} is signtool. An example of {version} is 1.3.8.",
|
||||
"DownloadingUrlToFile": "Downloading {url} -> {path}",
|
||||
"_DownloadingUrlToFile.comment": "An example of {url} is https://github.com/microsoft/vcpkg. An example of {path} is /foo/bar.",
|
||||
"DownloadingVcpkgStandaloneBundle": "Downloading standalone bundle {version}.",
|
||||
|
@ -768,7 +768,7 @@
|
|||
"_ExtendedDocumentationAtUrl.comment": "An example of {url} is https://github.com/microsoft/vcpkg.",
|
||||
"ExtractHelp": "Extracts an archive.",
|
||||
"ExtractingTool": "Extracting {tool_name}...",
|
||||
"_ExtractingTool.comment": "An example of {tool_name} is aria2.",
|
||||
"_ExtractingTool.comment": "An example of {tool_name} is signtool.",
|
||||
"FailedPostBuildChecks": "Found {count} post-build check problem(s). These are usually caused by bugs in portfile.cmake or the upstream build system. Please correct these before submitting this port to the curated registry.",
|
||||
"_FailedPostBuildChecks.comment": "An example of {count} is 42.",
|
||||
"FailedToAcquireMutant": "failed to acquire mutant {path}",
|
||||
|
@ -811,7 +811,7 @@
|
|||
"FailedToParseVersionFile": "Failed to parse version file: {path}",
|
||||
"_FailedToParseVersionFile.comment": "An example of {path} is /foo/bar.",
|
||||
"FailedToRunToolToDetermineVersion": "Failed to run \"{path}\" to determine the {tool_name} version.",
|
||||
"_FailedToRunToolToDetermineVersion.comment": "Additional information, such as the command line output, if any, will be appended on the line after this message An example of {tool_name} is aria2. An example of {path} is /foo/bar.",
|
||||
"_FailedToRunToolToDetermineVersion.comment": "Additional information, such as the command line output, if any, will be appended on the line after this message An example of {tool_name} is signtool. An example of {path} is /foo/bar.",
|
||||
"FailedToStoreBackToMirror": "Failed to store {path} to {url}.",
|
||||
"_FailedToStoreBackToMirror.comment": "An example of {path} is /foo/bar. An example of {url} is https://github.com/microsoft/vcpkg.",
|
||||
"FailedToStoreBinaryCache": "Failed to store binary cache {path}",
|
||||
|
@ -973,7 +973,6 @@
|
|||
"HelpTxtOptOnlyBinCache": "Fails if cached binaries are not available",
|
||||
"HelpTxtOptOnlyDownloads": "Makes best-effort attempt to download sources without building",
|
||||
"HelpTxtOptRecurse": "Allows removal of packages as part of installation",
|
||||
"HelpTxtOptUseAria2": "Uses aria2 to perform download tasks",
|
||||
"HelpTxtOptUseHeadVersion": "Installs the libraries on the command line using the latest upstream sources (classic mode)",
|
||||
"HelpTxtOptWritePkgConfig": "Writes a NuGet packages.config-formatted file for use with external binary caching. See `vcpkg help binarycaching` for more information",
|
||||
"_HelpTxtOptWritePkgConfig.comment": "'vcpkg help binarycaching' is a command line and should not be localized.",
|
||||
|
@ -1141,7 +1140,7 @@
|
|||
"JsonValueNotObject": "json value is not an object",
|
||||
"JsonValueNotString": "json value is not a string",
|
||||
"LaunchingProgramFailed": "Launching {tool_name}:",
|
||||
"_LaunchingProgramFailed.comment": "A platform API call failure message is appended after this An example of {tool_name} is aria2.",
|
||||
"_LaunchingProgramFailed.comment": "A platform API call failure message is appended after this An example of {tool_name} is signtool.",
|
||||
"LibraryArchiveMemberTooSmall": "A library archive member was too small to contain the expected data type.",
|
||||
"LibraryFirstLinkerMemberMissing": "Could not find first linker member name.",
|
||||
"LicenseExpressionContainsExtraPlus": "SPDX license expression contains an extra '+'. These are only allowed directly after a license identifier.",
|
||||
|
@ -1400,7 +1399,7 @@
|
|||
"ProgramPathReturnedNonzeroExitCode": "failed with exit code {exit_code}",
|
||||
"_ProgramPathReturnedNonzeroExitCode.comment": "An example of {exit_code} is 127.",
|
||||
"ProgramReturnedNonzeroExitCode": "{tool_name} failed with exit code: ({exit_code}).",
|
||||
"_ProgramReturnedNonzeroExitCode.comment": "The program's console output is appended after this. An example of {tool_name} is aria2. An example of {exit_code} is 127.",
|
||||
"_ProgramReturnedNonzeroExitCode.comment": "The program's console output is appended after this. An example of {tool_name} is signtool. An example of {exit_code} is 127.",
|
||||
"ProvideExportType": "At least one of the following options are required: --raw --nuget --ifw --zip --7zip --chocolatey --prefab.",
|
||||
"PushingVendorFailed": "Pushing {vendor} to \"{path}\" failed. Use --debug for more information.",
|
||||
"_PushingVendorFailed.comment": "An example of {vendor} is Azure. An example of {path} is /foo/bar.",
|
||||
|
@ -1483,12 +1482,12 @@
|
|||
"ToolDataFileSchemaVersionNotSupported": "document schema version {version} is not supported by this version of vcpkg",
|
||||
"_ToolDataFileSchemaVersionNotSupported.comment": "An example of {version} is 1.3.8.",
|
||||
"ToolFetchFailed": "Could not fetch {tool_name}.",
|
||||
"_ToolFetchFailed.comment": "An example of {tool_name} is aria2.",
|
||||
"_ToolFetchFailed.comment": "An example of {tool_name} is signtool.",
|
||||
"ToolHashMismatch": "{tool_name} appears to be already downloaded, but has an incorrect hash. Expected {expected} but was {actual}",
|
||||
"_ToolHashMismatch.comment": "{expected} and {actual} are SHA512 hashes in hex format. An example of {tool_name} is aria2.",
|
||||
"_ToolHashMismatch.comment": "{expected} and {actual} are SHA512 hashes in hex format. An example of {tool_name} is signtool.",
|
||||
"ToolInWin10": "This utility is bundled with Windows 10 or later.",
|
||||
"ToolOfVersionXNotFound": "A suitable version of {tool_name} was not found (required v{version}) and unable to automatically download a portable one. Please install a newer version of {tool_name}",
|
||||
"_ToolOfVersionXNotFound.comment": "An example of {tool_name} is aria2. An example of {version} is 1.3.8.",
|
||||
"_ToolOfVersionXNotFound.comment": "An example of {tool_name} is signtool. An example of {version} is 1.3.8.",
|
||||
"TotalInstallTime": "Total install time: {elapsed}",
|
||||
"_TotalInstallTime.comment": "An example of {elapsed} is 3.532 min.",
|
||||
"TrailingCommaInArray": "Trailing comma in array",
|
||||
|
@ -1547,7 +1546,7 @@
|
|||
"UnexpectedSwitch": "unexpected switch: {option}",
|
||||
"_UnexpectedSwitch.comment": "Switch is a command line switch like --switch An example of {option} is editable.",
|
||||
"UnexpectedToolOutput": "{tool_name} ({path}) produced unexpected output when attempting to determine the version:",
|
||||
"_UnexpectedToolOutput.comment": "The actual command line output will be appended after this message. An example of {tool_name} is aria2. An example of {path} is /foo/bar.",
|
||||
"_UnexpectedToolOutput.comment": "The actual command line output will be appended after this message. An example of {tool_name} is signtool. An example of {path} is /foo/bar.",
|
||||
"UnexpectedWindowsArchitecture": "unexpected Windows host architecture: {actual}",
|
||||
"_UnexpectedWindowsArchitecture.comment": "{actual} is the CPU kind we observed like ARM or MIPS",
|
||||
"UnknownBaselineFileContent": "unrecognizable baseline entry; expected 'port:triplet=(fail|skip|pass)'",
|
||||
|
|
|
@ -26,7 +26,7 @@ CMake suite maintained and supported by Kitware (kitware.com/cmake).)");
|
|||
REQUIRE(result.has_value());
|
||||
CHECK(*result.get() == std::array<int, 3>{3, 22, 2});
|
||||
|
||||
result = parse_tool_version_string(R"(aria2 version 1.35.0
|
||||
result = parse_tool_version_string(R"(example version 1.35.0
|
||||
Copyright (C) 2006, 2019 Tatsuhiro Tsujikawa)");
|
||||
REQUIRE(result.has_value());
|
||||
CHECK(*result.get() == std::array<int, 3>{1, 35, 0});
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace vcpkg
|
|||
CleanBuildtrees::Yes,
|
||||
CleanPackages::Yes,
|
||||
CleanDownloads::No,
|
||||
DownloadTool::Builtin,
|
||||
BackcompatFeatures::Allow,
|
||||
};
|
||||
|
||||
|
|
|
@ -96,7 +96,6 @@ namespace vcpkg
|
|||
CleanBuildtrees::No,
|
||||
CleanPackages::No,
|
||||
CleanDownloads::No,
|
||||
DownloadTool::Builtin,
|
||||
BackcompatFeatures::Allow,
|
||||
};
|
||||
|
||||
|
@ -289,18 +288,6 @@ namespace vcpkg
|
|||
}
|
||||
}
|
||||
|
||||
StringLiteral to_string_view(DownloadTool tool)
|
||||
{
|
||||
switch (tool)
|
||||
{
|
||||
case DownloadTool::Builtin: return "BUILT_IN";
|
||||
case DownloadTool::Aria2: return "ARIA2";
|
||||
default: Checks::unreachable(VCPKG_LINE_INFO);
|
||||
}
|
||||
}
|
||||
|
||||
std::string to_string(DownloadTool tool) { return to_string_view(tool).to_string(); }
|
||||
|
||||
Optional<LinkageType> to_linkage_type(StringView str)
|
||||
{
|
||||
if (str == "dynamic") return LinkageType::Dynamic;
|
||||
|
@ -789,18 +776,12 @@ namespace vcpkg
|
|||
{CMakeVariablePort, port_name},
|
||||
{CMakeVariableVersion, scf.to_version().text},
|
||||
{CMakeVariableUseHeadVersion, Util::Enum::to_bool(action.use_head_version) ? "1" : "0"},
|
||||
{CMakeVariableDownloadTool, to_string_view(build_options.download_tool)},
|
||||
{CMakeVariableEditable, Util::Enum::to_bool(action.editable) ? "1" : "0"},
|
||||
{CMakeVariableNoDownloads, !Util::Enum::to_bool(build_options.allow_downloads) ? "1" : "0"},
|
||||
{CMakeVariableZChainloadToolchainFile, action.pre_build_info(VCPKG_LINE_INFO).toolchain_file()},
|
||||
{CMakeVariableZPostPortfileIncludes, all_post_portfile_includes},
|
||||
};
|
||||
|
||||
if (build_options.download_tool == DownloadTool::Aria2)
|
||||
{
|
||||
variables.emplace_back("ARIA2", paths.get_tool_exe(Tools::ARIA2, out_sink));
|
||||
}
|
||||
|
||||
if (auto cmake_debug = args.cmake_debug.get())
|
||||
{
|
||||
if (cmake_debug->is_port_affected(port_name))
|
||||
|
|
|
@ -325,7 +325,6 @@ namespace vcpkg
|
|||
CleanBuildtrees::Yes,
|
||||
CleanPackages::Yes,
|
||||
CleanDownloads::No,
|
||||
DownloadTool::Builtin,
|
||||
BackcompatFeatures::Prohibit,
|
||||
KeepGoing::Yes,
|
||||
};
|
||||
|
|
|
@ -636,7 +636,6 @@ namespace vcpkg
|
|||
{SwitchRecurse, msgHelpTxtOptRecurse},
|
||||
{SwitchKeepGoing, msgHelpTxtOptKeepGoing},
|
||||
{SwitchEditable, msgHelpTxtOptEditable},
|
||||
{SwitchXUseAria2, msgHelpTxtOptUseAria2},
|
||||
{SwitchCleanAfterBuild, msgHelpTxtOptCleanAfterBuild},
|
||||
{SwitchCleanBuildtreesAfterBuild, msgHelpTxtOptCleanBuildTreesAfterBuild},
|
||||
{SwitchCleanPackagesAfterBuild, msgHelpTxtOptCleanPkgAfterBuild},
|
||||
|
@ -1045,7 +1044,6 @@ namespace vcpkg
|
|||
const bool is_recursive = Util::Sets::contains(options.switches, (SwitchRecurse));
|
||||
const bool is_editable =
|
||||
Util::Sets::contains(options.switches, (SwitchEditable)) || cmake_args_sets_variable(args);
|
||||
const bool use_aria2 = Util::Sets::contains(options.switches, (SwitchXUseAria2));
|
||||
const bool clean_after_build = Util::Sets::contains(options.switches, (SwitchCleanAfterBuild));
|
||||
const bool clean_buildtrees_after_build =
|
||||
Util::Sets::contains(options.switches, (SwitchCleanBuildtreesAfterBuild));
|
||||
|
@ -1117,9 +1115,6 @@ namespace vcpkg
|
|||
|
||||
auto& fs = paths.get_filesystem();
|
||||
|
||||
DownloadTool download_tool = DownloadTool::Builtin;
|
||||
if (use_aria2) download_tool = DownloadTool::Aria2;
|
||||
|
||||
const BuildPackageOptions build_package_options = {
|
||||
Util::Enum::to_enum<BuildMissing>(!no_build_missing),
|
||||
Util::Enum::to_enum<AllowDownloads>(!no_downloads),
|
||||
|
@ -1127,7 +1122,6 @@ namespace vcpkg
|
|||
Util::Enum::to_enum<CleanBuildtrees>(clean_after_build || clean_buildtrees_after_build),
|
||||
Util::Enum::to_enum<CleanPackages>(clean_after_build || clean_packages_after_build),
|
||||
Util::Enum::to_enum<CleanDownloads>(clean_after_build || clean_downloads_after_build),
|
||||
download_tool,
|
||||
prohibit_backcompat_features ? BackcompatFeatures::Prohibit : BackcompatFeatures::Allow,
|
||||
keep_going,
|
||||
};
|
||||
|
|
|
@ -334,7 +334,6 @@ namespace vcpkg
|
|||
CleanBuildtrees::Yes,
|
||||
CleanPackages::Yes,
|
||||
CleanDownloads::No,
|
||||
DownloadTool::Builtin,
|
||||
prohibit_backcompat_features,
|
||||
keep_going,
|
||||
};
|
||||
|
|
|
@ -67,7 +67,6 @@ namespace vcpkg
|
|||
CleanBuildtrees::Yes,
|
||||
CleanPackages::Yes,
|
||||
CleanDownloads::No,
|
||||
DownloadTool::Builtin,
|
||||
BackcompatFeatures::Allow,
|
||||
keep_going,
|
||||
};
|
||||
|
|
|
@ -433,24 +433,6 @@ namespace vcpkg
|
|||
}
|
||||
};
|
||||
|
||||
struct Aria2Provider : ToolProvider
|
||||
{
|
||||
virtual bool is_abi_sensitive() const override { return false; }
|
||||
virtual StringView tool_data_name() const override { return Tools::ARIA2; }
|
||||
virtual std::vector<StringView> system_exe_stems() const override { return {"aria2c"}; }
|
||||
virtual std::array<int, 3> default_min_version() const override { return {1, 33, 1}; }
|
||||
virtual ExpectedL<std::string> get_version(const ToolCache&, MessageSink&, const Path& exe_path) const override
|
||||
{
|
||||
return run_to_extract_version(Tools::ARIA2, exe_path, Command(exe_path).string_arg("--version"))
|
||||
.then([&](std::string&& output) {
|
||||
// Sample output:
|
||||
// aria2 version 1.35.0
|
||||
// Copyright (C) 2006, 2019 Tatsuhiro Tsujikawa
|
||||
return extract_prefixed_nonwhitespace("aria2 version ", Tools::ARIA2, std::move(output), exe_path);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
struct NodeProvider : ToolProvider
|
||||
{
|
||||
virtual bool is_abi_sensitive() const override { return false; }
|
||||
|
@ -1048,7 +1030,6 @@ namespace vcpkg
|
|||
if (tool == Tools::NINJA) return get_path(NinjaProvider(), status_sink);
|
||||
if (tool == Tools::POWERSHELL_CORE) return get_path(PowerShellCoreProvider(), status_sink);
|
||||
if (tool == Tools::NUGET) return get_path(NuGetProvider(), status_sink);
|
||||
if (tool == Tools::ARIA2) return get_path(Aria2Provider(), status_sink);
|
||||
if (tool == Tools::NODE) return get_path(NodeProvider(), status_sink);
|
||||
if (tool == Tools::IFW_INSTALLER_BASE) return get_path(IfwInstallerBaseProvider(), status_sink);
|
||||
if (tool == Tools::MONO) return get_path(MonoProvider(), status_sink);
|
||||
|
|
Загрузка…
Ссылка в новой задаче