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

Remove hard dependency on reqwest/default-tls #24

Merged
merged 2 commits into from
Oct 6, 2024

Conversation

DanielSidhion
Copy link
Contributor

The reqwest dependency was specified with all its default features, which includes default-tls. Even by using hcloud-cloud with its rustls-tls feature wouldn't remove the default-tls dependency.

[dependencies]
hcloud = { version = "0.20", default-features = false, features = ["rustls-tls"] }
$ cargo tree -e features -i reqwest
reqwest v0.12.8
├── reqwest feature "__rustls"
│   └── reqwest feature "rustls-tls-webpki-roots"
│       └── reqwest feature "rustls-tls"
│           └── hcloud feature "rustls-tls"
│               └── ...
...
├── reqwest feature "__tls"
│   ├── reqwest feature "__rustls" (*)
│   └── reqwest feature "default-tls"                        <- default-tls included here
│       └── reqwest feature "default"
│           └── hcloud v0.20.0
│               └── hcloud feature "rustls-tls" (*)          <- hcloud with rustls-tls here
...

This PR removes the default features of reqwest to avoid the default-tls feature. When doing this, we lose some of the other default features, so this PR also lists those features specifically to avoid losing them.

Copy link
Owner

@HenningHolmDE HenningHolmDE left a comment

Choose a reason for hiding this comment

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

Thank you very much for the PR. I did not think about this back then when I added the features, but of course, it makes total sense to do it this way.

It would be great if you could fix the new deprecation warning, though. Then I'm happy to merge the PR.

(The failing checks are fine and can be ignored, the step running the examples is missing the Hetzner API key - I have to disable that step for PRs.)

Cargo.toml Outdated Show resolved Hide resolved
@HenningHolmDE HenningHolmDE merged commit b1101eb into HenningHolmDE:master Oct 6, 2024
3 checks passed
@HenningHolmDE
Copy link
Owner

@DanielSidhion Thank you for providing the improvement. Do you need this to be released soon for your use case of the crate?

@DanielSidhion
Copy link
Contributor Author

@HenningHolmDE no worries, thanks for the review! I'm currently using a patch on my Cargo.toml, so no big rush with a new release. I'll subscribe to new releases of hcloud-rust so I can clean up the patch in the future.

@DanielSidhion DanielSidhion deleted the fix-rustls branch October 6, 2024 17:25
@HenningHolmDE
Copy link
Owner

@DanielSidhion I just released v0.20.1 patching this, sorry for the delay. You should be able to get rid of you patch, now.

@DanielSidhion
Copy link
Contributor Author

No worries, thank you! Just updated things on my side to remove the patch :)

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