Skip to content
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

Make feature(doc_auto_cfg) work #12642

Merged
merged 8 commits into from
Mar 23, 2024
Merged

Conversation

ameknite
Copy link
Contributor

@ameknite ameknite commented Mar 22, 2024

Objective

Solution

  • Apply --cfg=docsrs to all crates and CI.

I also added [package.metadata.docs.rs] to all crates to avoid adding code behind a feature and forget adding the metadata.

Before:

Screenshot 2024-03-22 at 00 51 57

After:
Screenshot 2024-03-22 at 00 51 32

@ameknite
Copy link
Contributor Author

ameknite commented Mar 22, 2024

I found that even enabling all-features=true. It can't not show "deep features"

Example:
This is how the docs looks in the bevy crate:
Screenshot 2024-03-22 at 01 42 08

and this is how it looks in the bevy_render crate:
Screenshot 2024-03-22 at 01 42 02

I don't know if exists a solution for this 🤔

@matiqo15 matiqo15 added the C-Docs An addition or correction to our documentation label Mar 22, 2024
Copy link
Member

@james7132 james7132 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Definitely wanted something like this for quite some time due to how many compile time features we're accumulating.

The CI failure looks like a false positive, what could be triggering an allowed lint?

Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm happy to merge this once you can appease CI.

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it A-Meta About the project itself and removed A-Meta About the project itself labels Mar 23, 2024
@james7132 james7132 added this pull request to the merge queue Mar 23, 2024
Merged via the queue into bevyengine:main with commit 72c51cd Mar 23, 2024
29 of 30 checks passed
@yrns
Copy link
Contributor

yrns commented Mar 23, 2024

@alice-i-cecile It's my understanding that docs.rs already adds the "docsrs" attribute since (rust-lang/docs.rs#2390) so the metadata is unnecessary (which it why I didn't add it), but it doesn't hurt to have.

Shatur added a commit to projectharmonia/bevy_replicon_renet that referenced this pull request Jul 20, 2024
Shatur added a commit to projectharmonia/bevy_replicon_renet that referenced this pull request Jul 20, 2024
Shatur added a commit to projectharmonia/bevy_replicon_renet that referenced this pull request Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants