-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Enable some features when generating documentation on docs.rs #6001
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
Conversation
|
Some of the features you added are already present in the default feature set: Lines 27 to 40 in e96b21a
Doesn't docs.rs use those? Otherwise https://docs.rs/bevy/latest/bevy/animation/struct.AnimationClip.html shouldn't be present as it's behind the |
|
Hmm, maybe we should enable all features? |
|
I don't know which ones are for internal use (ie bevy development) and which ones are to be used by users. If you have a list of features that shouldn't appear in the docs, I will update the PR.
Indeed, using
The |
|
I cleaned up the list of features by using
Why not. Just to be sure: do all features provide code too which would appear in the documentation? But if this is the best solution, there is an even simpler way for docs.rs to do that. :) |
0d69ad0 to
3a7a695
Compare
alice-i-cecile
left a comment
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.
I would rather enable all features or stick to default features: we don't have any development only flags and I'd really like to avoid keeping two lists.
|
Makes things simpler for me. :) |
3a7a695 to
5e33933
Compare
|
I updated it so that all features are enabled when building on docs.rs. Btw, you can find more information about it here: https://docs.rs/about/metadata |
alice-i-cecile
left a comment
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.
Nice, that's much easier to maintain.
|
I still don't understand the point of this? Bevy pretty much doesn't have any public items that are behind features not already enabled by default. What does it change for docs.rs which already uses the default set of features? It's mostly just going to increase build time on docs.rs. |
|
I honestly don't remember what I was missing in the documentation that forced me to render them locally. Should have precised it in my first comment, my bad. Looking at default features list, |
|
Yes, it is. I've been bitten before by the lack of We shouldn't change it to be one, just remarking on its use to end users. |
|
Then I guess it answers @mockersf's concern. :) |
|
Then is it really a good idea to have things on docs.rs that users won't find when they try to use them? I think docs.rs can't yet automatically mark those things as "hey it's behind a feature that you need to enable"
Why? If it's useful it should be in the default feature set I think. |
|
It's easier to find that a feature is needed rather than finding that a feature exists if it's not in the documentation. As a sidenote, we are currently writing an RFC for the "cfg_doc" feature, so wouldn't hurt to have it in any case. |
Serde leads to a large increase in compile times :( Maybe it should be on by default, but it's not a straightforward decision. |
|
A big poll to get people's opinion on this could help maybe? Personally I'm very happy serde isn't enabled by default as I don't use it. Don't know how common it is though. |
|
serde is still enabled in the default features. the serialise feature wasn't done in all sub crates, and bevy_gltf has a mandatory dependency on serde anyway |
|
done in #12366 |
While looking at some examples, I realized that it needed some features to be enabled because I couldn't find the related docs I built locally. It doesn't solve this issue unfortunately but at least when people will look on docs.rs, they will be able to find these items.