-
Notifications
You must be signed in to change notification settings - Fork 96
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
Enabled docs.rs feature gate flag rendering. #304
Conversation
I started using e.g. Code: https://github.com/georust/wkt/blob/main/src/lib.rs#L118 |
# include `array` feature in documentation | ||
features = ["array"] | ||
# define attribute `docsrs` for feature badges | ||
rustdoc-args = ["--cfg", "docsrs"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually had this before, but it got dropped in #281 (which should probably be reverted at some point).
@lnicola Note that even though docs.rs now supports the |
You're right, it's too bad docs.rs doesn't have a solution for this. |
Guess it would be great if they could always set |
This is the first time I've worked with this feature, so some of the nuances are going over my head. Based on what's said above, do we need to pause this PR for a while until the "every dependent crate must include this configuration" issue is resolved (so as to be good citizens)? As a secondary question, I read about the approach @michaelkirk uses in WKT, but wasn't sure if that would have other consequences, but it certainly seems better. Since WKT is very much a foundational library, should a) we go that way, and b) does it also suffer from the "transitive config" issue? |
I don't think this affects the other crates? It only enables the The previous problem was bigger, since you actually needed GDAL to build the docs. |
Agreed; I was trying to explain why #281 should not be reverted. This PR does not affect the dependent crates' docs, so we're good. |
90dea75
to
9001832
Compare
CHANGES.md
if knowledge of this change could be valuable to users.Followed approach outlined here.
Rendering can be tested locally with:
Not sure how to test end-to-end (as generated by docs.rs) from a PR.
Closes #228
Sample: