Use libcurl rather than curl command line#1906
Conversation
…hout curl embedded.
This reverts commit c2bd2db.
…2e test fail due to thinking they are in manifest mode.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
src/vcpkg/base/downloads.cpp:464
- The switch statement in
check_combine_download_prognosisis missing a case forDownloadPrognosis::TransientNetworkError. This enum value was added in line 440 but there's no corresponding case in the switch statement that handles it. This means ifindividual_callisTransientNetworkError, the function will hit thedefaultcase and callChecks::unreachable, which will terminate the program unexpectedly. You should add a case forTransientNetworkErrorthat determines how to combine this state with the target prognosis.
static bool check_combine_download_prognosis(DownloadPrognosis& target, DownloadPrognosis individual_call)
{
switch (individual_call)
{
case DownloadPrognosis::Success: return true;
case DownloadPrognosis::OtherError:
if (target == DownloadPrognosis::Success)
{
target = DownloadPrognosis::OtherError;
}
return false;
case DownloadPrognosis::NetworkErrorProxyMightHelp:
if (target == DownloadPrognosis::Success || target == DownloadPrognosis::OtherError)
{
target = DownloadPrognosis::NetworkErrorProxyMightHelp;
}
return false;
default: Checks::unreachable(VCPKG_LINE_INFO);
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
https://github.com/microsoft/vcpkg-tool/releases/tag/2026-02-17 Meaningful changes: * Test/fix internal dependencies in top level manifest. by @dg0yt in microsoft/vcpkg-tool#1890 * dependencies.cpp optimizations by @dg0yt in microsoft/vcpkg-tool#1891 * Switch default Ninja minimal version to a reasonable value by @cqundefine in microsoft/vcpkg-tool#1897 * Install files in parallel, redux by @BillyONeal in microsoft/vcpkg-tool#1896 * [tools] Fix missing executable permission on downloaded tools for Unix by @zynfly in microsoft/vcpkg-tool#1911 * Use libcurl rather than curl command line by @BillyONeal in microsoft/vcpkg-tool#1906 * Deduplicate "additional_file" in abi info. by @BillyONeal in microsoft/vcpkg-tool#1914 * Clamp invalid elapsed time instead of crashing in track_elapsed_us by @clee704 in microsoft/vcpkg-tool#1918
Restores #1856
Replaces #1860
Internal demonstration build: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=13191343&view=logs&j=4193bbc9-f3be-5e45-5485-eeda0c4f14df
Adopts libcurl for all http transactions rather than shelling out to the curl command line on some platforms, or winhttp sometimes.
dlopen/dlsym. Our telemetry showed approximately 1% of Linux customers unable to find alibcurl4.so; however we observed that some very old Debian derivatives have thecurlcommand line tool linking withlibcurl4-gnutls.soinstead, so we'll try that one too.VCPKG_LIBCURL_DLSYM_UPDATED_HEADERStells us to use updated headers.-DVCPKG_LIBCURL_DLSYM=OFFto build with a system-provided copy of curl (like macOS) instead.Because this opens the can of worms to build vcpkg on vcpkg we may want to consider moving the other two dependencies (cmrc and fmt) to use that as well but I haven't done that here.
Other changes from #1856
CURL_SSLVERSION_TLSv1_0and friends are polyfilled with their values taken from a later version of curlcurl_multi_pollis replaced withcurl_multi_waitat thedlopen/dlsymstage if the curl is old enough to not have_wait. That's a suboptimal perf situation but customers who care can fix it themselves by updating theirlibcurl4.soCURLOPT_HEADEROPT/CURLHEADER_SEPARATEdon't exist if the copy of curl is too old; those values are just cast from ints. Customers who have curl that old may get extra headers sent to their proxies; they can solve this by updating their copy of curl.