diff --git a/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 b/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 index c0115d518c..5e4d1b583e 100644 --- a/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 +++ b/azure-pipelines/e2e-specs/autocomplete-posh-vcpkg.Tests.ps1 @@ -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' diff --git a/include/vcpkg/base/contractual-constants.h b/include/vcpkg/base/contractual-constants.h index 9f6f3ec352..d48cc5c090 100644 --- a/include/vcpkg/base/contractual-constants.h +++ b/include/vcpkg/base/contractual-constants.h @@ -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"; diff --git a/include/vcpkg/base/message-args.inc.h b/include/vcpkg/base/message-args.inc.h index f49356c401..a84a36ab91 100644 --- a/include/vcpkg/base/message-args.inc.h +++ b/include/vcpkg/base/message-args.inc.h @@ -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") diff --git a/include/vcpkg/base/message-data.inc.h b/include/vcpkg/base/message-data.inc.h index 412500eb4b..10dc192024 100644 --- a/include/vcpkg/base/message-data.inc.h +++ b/include/vcpkg/base/message-data.inc.h @@ -1735,7 +1735,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, (), "", diff --git a/include/vcpkg/commands.build.h b/include/vcpkg/commands.build.h index d62c4f538a..31d391fb69 100644 --- a/include/vcpkg/commands.build.h +++ b/include/vcpkg/commands.build.h @@ -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; }; diff --git a/include/vcpkg/fwd/build.h b/include/vcpkg/fwd/build.h index ee0fe89f08..085b2fed9e 100644 --- a/include/vcpkg/fwd/build.h +++ b/include/vcpkg/fwd/build.h @@ -57,12 +57,6 @@ namespace vcpkg Release, }; - enum class DownloadTool - { - Builtin, - Aria2, - }; - enum class Editable { No = 0, diff --git a/include/vcpkg/tools.h b/include/vcpkg/tools.h index 32b5860a02..214254a05e 100644 --- a/include/vcpkg/tools.h +++ b/include/vcpkg/tools.h @@ -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 diff --git a/locales/messages.json b/locales/messages.json index c6aa16f284..5d91002ac1 100644 --- a/locales/messages.json +++ b/locales/messages.json @@ -647,7 +647,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}.", @@ -766,7 +766,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}", @@ -809,7 +809,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}", @@ -971,7 +971,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.", @@ -1139,7 +1138,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.", @@ -1398,7 +1397,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.", @@ -1481,12 +1480,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", @@ -1545,7 +1544,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)'", diff --git a/src/vcpkg-test/tools.cpp b/src/vcpkg-test/tools.cpp index 1dfe52b993..a67d7da8e8 100644 --- a/src/vcpkg-test/tools.cpp +++ b/src/vcpkg-test/tools.cpp @@ -26,7 +26,7 @@ CMake suite maintained and supported by Kitware (kitware.com/cmake).)"); REQUIRE(result.has_value()); CHECK(*result.get() == std::array{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{1, 35, 0}); diff --git a/src/vcpkg/commands.build-external.cpp b/src/vcpkg/commands.build-external.cpp index 3bf6987067..ebba5f372b 100644 --- a/src/vcpkg/commands.build-external.cpp +++ b/src/vcpkg/commands.build-external.cpp @@ -34,7 +34,6 @@ namespace vcpkg CleanBuildtrees::Yes, CleanPackages::Yes, CleanDownloads::No, - DownloadTool::Builtin, BackcompatFeatures::Allow, }; diff --git a/src/vcpkg/commands.build.cpp b/src/vcpkg/commands.build.cpp index 55f804282c..140315ac61 100644 --- a/src/vcpkg/commands.build.cpp +++ b/src/vcpkg/commands.build.cpp @@ -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 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)) diff --git a/src/vcpkg/commands.ci.cpp b/src/vcpkg/commands.ci.cpp index 8d26cf8846..6b18b24c38 100644 --- a/src/vcpkg/commands.ci.cpp +++ b/src/vcpkg/commands.ci.cpp @@ -325,7 +325,6 @@ namespace vcpkg CleanBuildtrees::Yes, CleanPackages::Yes, CleanDownloads::No, - DownloadTool::Builtin, BackcompatFeatures::Prohibit, KeepGoing::Yes, }; diff --git a/src/vcpkg/commands.install.cpp b/src/vcpkg/commands.install.cpp index b7eb7ec8e0..d64117bc3f 100644 --- a/src/vcpkg/commands.install.cpp +++ b/src/vcpkg/commands.install.cpp @@ -636,7 +636,6 @@ namespace vcpkg {SwitchRecurse, msgHelpTxtOptRecurse}, {SwitchKeepGoing, msgHelpTxtOptKeepGoing}, {SwitchEditable, msgHelpTxtOptEditable}, - {SwitchXUseAria2, msgHelpTxtOptUseAria2}, {SwitchCleanAfterBuild, msgHelpTxtOptCleanAfterBuild}, {SwitchCleanBuildtreesAfterBuild, msgHelpTxtOptCleanBuildTreesAfterBuild}, {SwitchCleanPackagesAfterBuild, msgHelpTxtOptCleanPkgAfterBuild}, @@ -1044,7 +1043,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)); @@ -1116,9 +1114,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(!no_build_missing), Util::Enum::to_enum(!no_downloads), @@ -1126,7 +1121,6 @@ namespace vcpkg Util::Enum::to_enum(clean_after_build || clean_buildtrees_after_build), Util::Enum::to_enum(clean_after_build || clean_packages_after_build), Util::Enum::to_enum(clean_after_build || clean_downloads_after_build), - download_tool, prohibit_backcompat_features ? BackcompatFeatures::Prohibit : BackcompatFeatures::Allow, keep_going, }; diff --git a/src/vcpkg/commands.set-installed.cpp b/src/vcpkg/commands.set-installed.cpp index d525535c4c..9b0eecfca0 100644 --- a/src/vcpkg/commands.set-installed.cpp +++ b/src/vcpkg/commands.set-installed.cpp @@ -334,7 +334,6 @@ namespace vcpkg CleanBuildtrees::Yes, CleanPackages::Yes, CleanDownloads::No, - DownloadTool::Builtin, prohibit_backcompat_features, keep_going, }; diff --git a/src/vcpkg/commands.upgrade.cpp b/src/vcpkg/commands.upgrade.cpp index 7cc1f00323..ee29e4608a 100644 --- a/src/vcpkg/commands.upgrade.cpp +++ b/src/vcpkg/commands.upgrade.cpp @@ -67,7 +67,6 @@ namespace vcpkg CleanBuildtrees::Yes, CleanPackages::Yes, CleanDownloads::No, - DownloadTool::Builtin, BackcompatFeatures::Allow, keep_going, }; diff --git a/src/vcpkg/tools.cpp b/src/vcpkg/tools.cpp index b91bc79ed9..2927a67682 100644 --- a/src/vcpkg/tools.cpp +++ b/src/vcpkg/tools.cpp @@ -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 system_exe_stems() const override { return {"aria2c"}; } - virtual std::array default_min_version() const override { return {1, 33, 1}; } - virtual ExpectedL 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);