Skip to content

Update the way we check for libcurl feature availability #4962

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

Merged

Conversation

parkera
Copy link
Contributor

@parkera parkera commented May 21, 2024

Since we can't rely on cmake to inspect the version of curl when we build as a package, switch to using a different approach for verifying availability of features that rely on certain versions of libcurl.

@parkera parkera changed the base branch from main to package May 21, 2024 00:30
@parkera
Copy link
Contributor Author

parkera commented May 21, 2024

@al45tair this came up when I merged your latest changes from main into our package branch, so including you for review as well.

/* The maximum number of simultaneous persistent connections per host */
@available(*, deprecated, message: "This platform doles not support selecting the maximum number of simultaneous persistent connections per host. This property is ignored.")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We lose this part, but that's the consequence until swiftpm supports something like cmake does here.

@@ -34,6 +34,27 @@
#include <winsock2.h>
#endif

// 7.84.0 or later
#if LIBCURL_VERSION_MAJOR > 7 || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR > 84) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR == 84 && LIBCURL_VERSION_PATCH >= 0)
#define NS_CURL_CURLINFO_CAINFO_SUPPORTED 1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inverted the sense from "missing" to "supported" because it was a lot easier to understand.

@parkera parkera merged commit 855f90f into swiftlang:package May 21, 2024
@parkera parkera deleted the parkera/change_curl_feature_availability branch May 21, 2024 16:22
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.

2 participants