bevy
bevy copied to clipboard
Enable nightly to have scraping examples for dev-docs generation
Objective
- Show scraped examples in docs.rs
Solution
- cargo doc needs the nightly channel. Local experiments showed that explicitly setting the unstable
rustdoc-scrape-examplesflag seems to work better than setting in the Cargo.toml.
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
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.
@mockersf Ah I didn't go deep enough it seems... Sorry about that... This was already tested and didn't work...
Closing this PR.
In my opinion it's still interesting to enable scraping examples on the dev-docs, so this PR makes sense!
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?
#2305 was merged, so this is now mergeable!
@BD103 All done! Thanks!
done in https://github.com/bevyengine/bevy/pull/12223, sorry I forgot about this PR