Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): migrate from curl to curl-winssl on Windows #3246

Merged

Conversation

ReenigneArcher
Copy link
Member

Description

See: msys2/MINGW-packages#21028

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Copy link

codecov bot commented Sep 30, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 9.82%. Comparing base (fa654c1) to head (60f1b24).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/httpcommon.cpp 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #3246      +/-   ##
=========================================
- Coverage    9.82%   9.82%   -0.01%     
=========================================
  Files         101     101              
  Lines       17981   17980       -1     
  Branches     8419    8417       -2     
=========================================
- Hits         1767    1766       -1     
  Misses      13323   13323              
  Partials     2891    2891              
Flag Coverage Δ
Linux 7.27% <50.00%> (ø)
Windows 5.10% <50.00%> (-0.01%) ⬇️
macOS-13 10.73% <50.00%> (+0.03%) ⬆️
macOS-14 10.01% <50.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/httpcommon.cpp 25.54% <50.00%> (-0.54%) ⬇️

@ReenigneArcher
Copy link
Member Author

The download_file function is failing with curl 8.10. Need to determine what is causing it from after bumping from version 8.8.

@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-latest-curl-for-windows-build branch from 0b5a4b2 to 779a32d Compare September 30, 2024 23:37
@ReenigneArcher
Copy link
Member Author

ReenigneArcher commented Oct 1, 2024

@mariotaku any idea how to resolve the download file errors when using the latest curl (8.10)? I commented out a recent change I made to make sure it wasn't that. (curl_easy_setopt(curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);) ... the test website reports it uses TLS 1.2 anyway, so I guess it's unlikely to be the cause of the error.

image

Test logs:

[ RUN      ] DownloadFileTests/DownloadFileTest.Run/0
D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:45: Failure
Value of: http::download_file(url, path)
  Actual: false
Expected: true
[2024-09-30 23:58:28.388]: Tests: From D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:41
[2024-09-30 23:58:28.388]: Tests:   DownloadFileTests/DownloadFileTest/Run/0 started
[2024-09-30 23:58:28.434]: Error: Couldn't download [https://httpbin.org/base64/aGVsbG8h, code:35]
[2024-09-30 23:58:28.434]: Tests: At D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:45
[2024-09-30 23:58:28.434]: Tests:   Failure: Value of: http::download_file(url, path)
  Actual: false
Expected: true
[2024-09-30 23:58:28.434]: Tests: DownloadFileTests/DownloadFileTest/Run/0 failed
[  FAILED  ] DownloadFileTests/DownloadFileTest.Run/0, where GetParam() = ("https://httpbin.org/base64/aGVsbG8h", "hello.txt") (46 ms)
[ RUN      ] DownloadFileTests/DownloadFileTest.Run/1
D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:45: Failure
Value of: http::download_file(url, path)
  Actual: false
Expected: true
[2024-09-30 23:58:28.434]: Tests: From D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:41
[2024-09-30 23:58:28.435]: Tests:   DownloadFileTests/DownloadFileTest/Run/1 started
[2024-09-30 23:58:28.479]: Error: Couldn't download [https://httpbin.org/redirect-to?url=/base64/aGVsbG8h, code:35]
[2024-09-30 23:58:28.479]: Tests: At D:/a/Sunshine/Sunshine/tests/unit/test_httpcommon.cpp:45
[2024-09-30 23:58:28.479]: Tests:   Failure: Value of: http::download_file(url, path)
  Actual: false
Expected: true
[2024-09-30 23:58:28.479]: Tests: DownloadFileTests/DownloadFileTest/Run/1 failed
[  FAILED  ] DownloadFileTests/DownloadFileTest.Run/1, where GetParam() = ("https://httpbin.org/redirect-to?url=/base64/aGVsbG8h", "hello-redirect.txt") (44 ms)

Edit: opened a discussion in curl repo: curl/curl#15099 ... might be a msys2/ucrt64 specific issue as it doesn't happen in the same version in ArchLinux build.

@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-latest-curl-for-windows-build branch 5 times, most recently from ace3b17 to dc857b6 Compare October 1, 2024 03:03
@ReenigneArcher

This comment was marked as resolved.

@ReenigneArcher ReenigneArcher marked this pull request as ready for review October 1, 2024 03:35
.github/workflows/CI.yml Outdated Show resolved Hide resolved
@ReenigneArcher ReenigneArcher force-pushed the build/deps/use-latest-curl-for-windows-build branch from dc857b6 to 60f1b24 Compare October 1, 2024 23:14
Copy link

sonarcloud bot commented Oct 1, 2024

@ReenigneArcher ReenigneArcher changed the title build(deps): use latest curl for windows build build(deps): migrate from curl to curl-winssl on Windows Oct 1, 2024
@ReenigneArcher ReenigneArcher enabled auto-merge (squash) October 1, 2024 23:37
@ReenigneArcher ReenigneArcher merged commit 9cc8bc8 into master Oct 2, 2024
36 checks passed
@ReenigneArcher ReenigneArcher deleted the build/deps/use-latest-curl-for-windows-build branch October 2, 2024 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot build on Windows.(undefined reference to ...)
2 participants