Roblox / rs-consul

This crate provides access to a set of strongly typed apis to interact with consul (https://www.consul.io/)
MIT License
36 stars 23 forks source link

Features are supposed to be additive #29

Closed nox closed 1 year ago

nox commented 2 years ago

Using features to choose a specific TLS backend is not how features are supposed to be used. Features are supposed to add functionality and never be mutually exclusive.

Would you consider a PR that makes the HTTPS connector a config setting, so that downstream users of that crate can choose whichever one they want? I want to use this crate with boring.

kushudai commented 1 year ago

Hi, thank you for bringing this up! You're right but this does allow us to not bring in both dependencies at compile time.

I'm wondering if the right thing to do here is to swallow the breaking change and just switch over to a modern version of rustls as the default. And then we could allow additive features that also switches the backend while not being able to lose the rustls dependency. It should be straightforward to emit a compiler error in case the choice is for boringSSL or openSSL but that feature is not enabled. 🙂