-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
[curl] Add support of different features. #2862
Conversation
I have tested as many features as possible, however I found some dark corners of the Default-Features #2697 support. For example,
Vcpkg still tries to install default features:
The only way to avoid it is to install corresponding dependencies manually:
However it still fails at the end:
So, I had to change |
cc @ras0219-msft @alexkaratarakis Could you guys have a look at this PR and give your opinion, please? |
Yes, that is intended, see discussion on #2697 :) |
17dd6b3
to
aeb02fb
Compare
Thanks for the PR! I'll corroborate what @Squareys mentioned -- the "by design" behavior is that if you haven't explicitly told us that you know about the package (by pre-installing it or listing it on the command line), then we use the defaults. Note that if you currently have
This is definitely a bug; you should never see "The build command requires all dependencies to be already installed." during an installation. While trying to investigate that bug (I'm not able to repro it yet so further information would be awesome :)), I did find another serious bug in feature dependencies. If you had an installed package with a dependency like Finally, I pushed some changes (let me know if you think these are a problem):
Edit: I actually realized how it should be (w.r.t. the ssl feature) while writing this and had to go back and change my implementation :) |
Off the top of my head I cannot remember writing a test for that. I have a hunch that this may be an actual issue. |
@ras0219-msft thanks for the great explanation and your effort to make this PR better. However I can't go with a separate triplet since it will require to rebuild ALL my libraries and will break the vcpkg integration with projects. Essentially we went back again to the original status quo. |
I found more bugs with feature packages (😦) but I've fixed all of them that I'm aware of (😄) so please try out c267f32 -- I'll rebase this PR onto that and push it here.
Ideally, you can edit the existing triplets (x86-windows.cmake) locally to meet your needs. If that doesn't work well, we have several scenarios that need adjusting :) Edit: rebased & pushed. |
Default-Features: openssl, http2, ssh (as in previous builds) Feature: curl Description: Builds curl executable (placed in the /tools directory) Feature: http-only Description: Disables all protocols except HTTP/HTTPS/HTTP2 Feature: http2 Build-Depends: nghttp2, openssl Description: HTTP2 support (requires openssl) Feature: openssl Build-Depends: openssl Description: SSL support via OpenSSL Feature: winssl Description: SSL support via Schannel Feature: ssh Build-Depends: libssh2 Description: SSH support via libssh2
…ame "curl" feature to "tool".
f4da47a
to
d80be88
Compare
And to force other people to do it? No, it does not make sense. Ideally, Anyway, thanks. |
Is there any progress with fixing broken openssl dependency with winssl selected? |
This PR adds different features for the
cURL
library and, as an example, adds corresponding parts to theCPR
library.Default-Features: openssl, http2, ssh (as in previous builds)
Feature: curl
Description: Builds curl executable (placed in the /tools directory)
Feature: http-only
Description: Disables all protocols except HTTP/HTTPS/HTTP2
Feature: http2
Build-Depends: nghttp2, openssl
Description: HTTP2 support (requires openssl)
Feature: openssl
Build-Depends: openssl
Description: SSL support via OpenSSL
Feature: winssl
Description: SSL support via Schannel
Feature: ssh
Build-Depends: libssh2
Description: SSH support via libssh2