bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Enable nightly to have scraping examples for dev-docs generation

Open ShadowMitia opened this issue 2 years ago • 7 comments
trafficstars

Objective

  • Show scraped examples in docs.rs

Solution

  • cargo doc needs the nightly channel. Local experiments showed that explicitly setting the unstable rustdoc-scrape-examples flag seems to work better than setting in the Cargo.toml.

ShadowMitia avatar Oct 15 '23 15:10 ShadowMitia

This is not for docs.rs, this is for https://dev-docs.bevyengine.org/bevy/index.html

docs.rs issue is related to https://github.com/rust-lang/docs.rs/issues/2305

mockersf avatar Oct 15 '23 15:10 mockersf

This is a tentative solution, I'm not familiar enough with github workflows...

I have seen some of the issues on the subject, and the PR merged (for 0.11.1 I believe), everything looks fine. I think the issue is mainly to make sure the nightly channel needs to be set. I am unsure why setting the flags works better, they might not be necessary.

Hope I'm not stepping on anyone's toes here. If I am feel free to close this PR. I'm explicitly allowing reuse without attribution just in case.

ShadowMitia avatar Oct 15 '23 15:10 ShadowMitia

@mockersf Ah I didn't go deep enough it seems... Sorry about that... This was already tested and didn't work...

Closing this PR.

ShadowMitia avatar Oct 15 '23 15:10 ShadowMitia

In my opinion it's still interesting to enable scraping examples on the dev-docs, so this PR makes sense!

mockersf avatar Oct 15 '23 15:10 mockersf

Enabling nightly should be enough then, and whatever needs to be done as well for docs.rs. So waiting on https://github.com/rust-lang/docs.rs/issues/2305 to be closed?

ShadowMitia avatar Oct 15 '23 15:10 ShadowMitia

#2305 was merged, so this is now mergeable!

ShadowMitia avatar Jan 07 '24 13:01 ShadowMitia

@BD103 All done! Thanks!

ShadowMitia avatar Jan 16 '24 18:01 ShadowMitia

done in https://github.com/bevyengine/bevy/pull/12223, sorry I forgot about this PR

mockersf avatar Mar 04 '24 09:03 mockersf