-
Notifications
You must be signed in to change notification settings - Fork 72
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
README and examples use unavailable API #18
Comments
I'm aware of this. How do you think we should address it? (Did you end up in a state where you're using a newer version of tokio-rustls, or just consuming the mainline README while using an older version of the relevant crates? Do you not update crates regularly?) |
What happened is I upgraded a binary project from The "minimum correct fix" would have been for This is one of those weird issues caused by crates re-exporting the public APIs of their dependencies; there is no way to easily constrain minimum patch updates of transient dependencies of a crate, without adding a direct dependency on that transient dependency, and while it's obvious in this case, it's not generally obvious that the re-exported API is not controlled by the patch revision of the re-exporting crate. |
For this crate, I think it would be fine to just ensure that any compiling code in this repository (including examples) is using APIs that are part of the minimum versions selected for the crate's dependencies. If, for example, a |
I've opened hyperium/tonic#1510 about fixing the downstream instance of this issue that hit me. |
#9 did upgrade the dependency for the library, it just didn't get released. |
I am seeing |
You probably have a version mismatch between rustls and tokio-rustls versions. |
The README has this example code:
tokio-rustls/README.md
Lines 22 to 23 in 63b8d6f
This API was added in
rustls 0.21.6
. However,Cargo.toml
(for the latest published release) only requirerustls 0.21.0
, leading to compilation errors if someone updatestokio-rustls
without also updating therustls
point release (and the error message does not make it obvious that this is the solution).The text was updated successfully, but these errors were encountered: