Skip to content

Commit b4d82ea

Browse files
committed
PR comments WIP
1 parent 27e4d10 commit b4d82ea

File tree

8 files changed

+91
-100
lines changed

8 files changed

+91
-100
lines changed

include/vcpkg/base/contractual-constants.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ namespace vcpkg
207207
inline constexpr StringLiteral SwitchDebug = "debug";
208208
inline constexpr StringLiteral SwitchDebugBin = "debug-bin";
209209
inline constexpr StringLiteral SwitchDebugEnv = "debug-env";
210-
inline constexpr StringLiteral SwitchDeleteFileAfterUpload = "delete-file-after-upload";
211210
inline constexpr StringLiteral SwitchDgml = "dgml";
212211
inline constexpr StringLiteral SwitchDisableMetrics = "disable-metrics";
213212
inline constexpr StringLiteral SwitchDot = "dot";

include/vcpkg/base/curl.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
VCPKG_MSVC_WARNING(push)
66
// note: disable warning triggered by curl headers
7-
// ws2tcpip.h(968): warning C6101: Returning uninitialized memory '*Mtu': A successful path through the function does not set the named _Out_ parameter.
8-
VCPKG_MSVC_WARNING(disable: 6101)
7+
// ws2tcpip.h(968): warning C6101: Returning uninitialized memory '*Mtu': A successful path through the function does
8+
// not set the named _Out_ parameter.
9+
VCPKG_MSVC_WARNING(disable : 6101)
910
#include <curl/curl.h>
1011
#include <curl/multi.h>
1112
VCPKG_MSVC_WARNING(pop)

include/vcpkg/base/message-data.inc.h

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ DECLARE_MESSAGE(CmdUpdateRegistryAllOrTargets,
863863
(),
864864
"",
865865
"Update registry requires either a list of artifact registry names or URiIs to update, or --all.")
866-
DECLARE_MESSAGE(CmdUploadMetricsDeleteFileAfterUpload, (), "", "Delete metrics payload file after upload")
867866
DECLARE_MESSAGE(CmdUpgradeOptNoDryRun, (), "", "Actually upgrade")
868867
DECLARE_MESSAGE(CmdUpgradeOptNoKeepGoing, (), "", "Stop installing packages on failure")
869868
DECLARE_MESSAGE(CmdUseExample1,
@@ -964,17 +963,17 @@ DECLARE_MESSAGE(CreatingNuGetPackage, (), "", "Creating NuGet package...")
964963
DECLARE_MESSAGE(CreatingZipArchive, (), "", "Creating zip archive...")
965964
DECLARE_MESSAGE(CreationFailed, (msg::path), "", "Creating {path} failed.")
966965
DECLARE_MESSAGE(CurlFailedGeneric,
967-
(msg::exit_code, msg::error_msg),
966+
(msg::exit_code),
968967
"curl is the name of a program, see curl.se.",
969-
"curl operation failed with error code {exit_code} ({error_msg}).")
968+
"curl operation failed with error code {exit_code}")
970969
DECLARE_MESSAGE(CurlFailedGenericNoRetryAddendum,
971970
(msg::url),
972971
"curl is the name of a program, see curl.se.",
973972
"This is a non-transient error, won't retry downloading from {url}.")
974-
DECLARE_MESSAGE(CurlFailedGenericWithRetry,
975-
(msg::exit_code, msg::error_msg, msg::count, msg::value),
976-
"curl is the name of a program, see curl.se. {value} is the maximum amount of retries.",
977-
"curl operation failed with error code {exit_code} ({error_msg}) retry {count} of {value}.")
973+
DECLARE_MESSAGE(CurlFailedTimeoutRetry,
974+
(msg::count, msg::value),
975+
"{count} is the current retry atttempt, {value} is the maximum amount of retries.",
976+
"The operation timed out retry {count} of {value}.")
978977
DECLARE_MESSAGE(CurlFailedHttpResponse,
979978
(msg::exit_code),
980979
"curl is the name of a program, see curl.se.",
@@ -983,10 +982,10 @@ DECLARE_MESSAGE(CurlFailedHttpResponseWithRetry,
983982
(msg::exit_code, msg::count, msg::value),
984983
"curl is the name of a program, see curl.se. {value} is the maximum amount of retries.",
985984
"curl operation failed with HTTP response code {exit_code} retry {count} of {value}.")
986-
DECLARE_MESSAGE(CurlFailedToPutHttp,
987-
(msg::exit_code, msg::error_msg, msg::url, msg::value),
985+
DECLARE_MESSAGE(CurlFailedToPut,
986+
(msg::url, msg::value),
988987
"curl is the name of a program, see curl.se. {value} is an HTTP status code",
989-
"curl failed to put file to {url} with exit code {exit_code} ({error_msg}) and http code {value}.")
988+
"curl failed to PUT file to {url} with response code {value}.")
990989
DECLARE_MESSAGE(CurrentCommitBaseline,
991990
(msg::commit_sha),
992991
"",

locales/messages.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@
502502
"CmdUpdateRegistrySynopsis": "Re-downloads an artifact registry",
503503
"CmdUpgradeOptNoDryRun": "Actually upgrade",
504504
"CmdUpgradeOptNoKeepGoing": "Stop installing packages on failure",
505-
"CmdUploadMetricsDeleteFileAfterUpload": "Delete metrics payload file after upload",
506505
"CmdUseExample1": "vcpkg use <artifact name>",
507506
"_CmdUseExample1.comment": "This is a command line, only the <artifact name> part should be localized.",
508507
"CmdUseSynopsis": "Activate a single artifact in this shell",
@@ -561,18 +560,18 @@
561560
"CreatingZipArchive": "Creating zip archive...",
562561
"CreationFailed": "Creating {path} failed.",
563562
"_CreationFailed.comment": "An example of {path} is /foo/bar.",
564-
"CurlFailedGeneric": "curl operation failed with error code {exit_code} ({error_msg}).",
565-
"_CurlFailedGeneric.comment": "curl is the name of a program, see curl.se. An example of {exit_code} is 127. An example of {error_msg} is File Not Found.",
563+
"CurlFailedGeneric": "curl operation failed with error code {exit_code}",
564+
"_CurlFailedGeneric.comment": "curl is the name of a program, see curl.se. An example of {exit_code} is 127.",
566565
"CurlFailedGenericNoRetryAddendum": "This is a non-transient error, won't retry downloading from {url}.",
567566
"_CurlFailedGenericNoRetryAddendum.comment": "curl is the name of a program, see curl.se. An example of {url} is https://github.com/microsoft/vcpkg.",
568-
"CurlFailedGenericWithRetry": "curl operation failed with error code {exit_code} ({error_msg}) retry {count} of {value}.",
569-
"_CurlFailedGenericWithRetry.comment": "curl is the name of a program, see curl.se. {value} is the maximum amount of retries. An example of {exit_code} is 127. An example of {error_msg} is File Not Found. An example of {count} is 42.",
570567
"CurlFailedHttpResponse": "curl operation failed with HTTP response code {exit_code}.",
571568
"_CurlFailedHttpResponse.comment": "curl is the name of a program, see curl.se. An example of {exit_code} is 127.",
572569
"CurlFailedHttpResponseWithRetry": "curl operation failed with HTTP response code {exit_code} retry {count} of {value}.",
573570
"_CurlFailedHttpResponseWithRetry.comment": "curl is the name of a program, see curl.se. {value} is the maximum amount of retries. An example of {exit_code} is 127. An example of {count} is 42.",
574-
"CurlFailedToPutHttp": "curl failed to put file to {url} with exit code {exit_code} ({error_msg}) and http code {value}.",
575-
"_CurlFailedToPutHttp.comment": "curl is the name of a program, see curl.se. {value} is an HTTP status code An example of {exit_code} is 127. An example of {error_msg} is File Not Found. An example of {url} is https://github.com/microsoft/vcpkg.",
571+
"CurlFailedTimeoutRetry": "The operation timed out retry {count} of {value}.",
572+
"_CurlFailedTimeoutRetry.comment": "{count} is the current retry atttempt, {value} is the maximum amount of retries. An example of {count} is 42.",
573+
"CurlFailedToPut": "curl failed to PUT file to {url} with response code {value}.",
574+
"_CurlFailedToPut.comment": "curl is the name of a program, see curl.se. {value} is an HTTP status code An example of {url} is https://github.com/microsoft/vcpkg.",
576575
"CurrentCommitBaseline": "You can use the current commit as a baseline, which is:\n\t\"builtin-baseline\": \"{commit_sha}\"",
577576
"_CurrentCommitBaseline.comment": "An example of {commit_sha} is 7cfad47ae9f68b183983090afd6337cd60fd4949.",
578577
"CycleDetectedDuring": "cycle detected during {spec}:",

src/vcpkg.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ namespace
136136

137137
void inner(const Filesystem& fs, const VcpkgCmdArguments& args, const BundleSettings& bundle)
138138
{
139-
// Ensure that we call curl_global_init only once in the program.
140-
if (CURLE_OK != curl_global_init_status())
141-
{
142-
Debug::println("Failed to initialize CURL");
143-
}
144-
145139
// track version on each invocation
146140
get_global_metrics_collector().track_string(StringMetric::VcpkgVersion, vcpkg_executable_version);
147141

0 commit comments

Comments
 (0)