-
Notifications
You must be signed in to change notification settings - Fork 597
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
discussion: re-exporting rustls-pki-types #1662
Comments
Fair enough. I agree the documentation situation for re-exports is pretty weak, but I like using them in practice -- avoiding the extra import and (hopefully not much in this case, but in many other situations) the coupled version tracking. Maybe this needs a rustdoc feature to clearly highlight re-exports? Would be a nice to have IMO. |
I quite like reexports, and think they work well if
|
Having done a few dependent crate updates at this point I agree with this assessment RE: pki-types. The dependent crates I've been updating don't use pki-types anywhere except for interacting with rustls. Having to carry and version an independent dependency on pki-types feels like noise that could be cut out with a re-export. |
Reopening discussion to consider rustls/pki-types#24. Also I wanted to note (and this is clearly a rustdoc bug): the rustls re-exports will show |
Should we file for this? Why is it useful to reopen this issue rather than discussing on the PR itself? |
Pulling out a conversation from #1651 (comment):
My feeling is no. We can document that rustls depends on pki-types 1.0, but I think the pattern of re-exporting a crate in multiple places is confusing.
One of my very confusing experiences as a Rust beginner was noticing that
hyper::Response
andhttp::Response
have the same documentation, the same methods, and so on, but are in different libraries. It's not documented that one is actually a re-export of the other, so I thought it might have been copy-pasted code or an older version of the same library. I wound up spending some time looking carefully for differences to see why these were different types, and of course found none.The text was updated successfully, but these errors were encountered: