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

Enable nightly to have scraping examples for dev-docs generation #10130

Closed

Conversation

ShadowMitia
Copy link
Contributor

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.

@mockersf
Copy link
Member

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

docs.rs issue is related to rust-lang/docs.rs#2305

@mockersf mockersf added C-Docs An addition or correction to our documentation A-Build-System Related to build systems or continuous integration labels Oct 15, 2023
@ShadowMitia
Copy link
Contributor Author

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
Copy link
Contributor Author

ShadowMitia commented Oct 15, 2023

@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 ShadowMitia deleted the github-docs-scrape-examples branch October 15, 2023 15:21
@mockersf
Copy link
Member

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

@ShadowMitia ShadowMitia restored the github-docs-scrape-examples branch October 15, 2023 15:23
@ShadowMitia ShadowMitia reopened this Oct 15, 2023
@ShadowMitia ShadowMitia changed the title Enable scraping examples for docs.rs generation Enable scraping examples for dev-docs generation Oct 15, 2023
@ShadowMitia ShadowMitia force-pushed the github-docs-scrape-examples branch 2 times, most recently from 521a3db to c5750ad Compare October 15, 2023 15:41
@ShadowMitia
Copy link
Contributor Author

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

@ShadowMitia ShadowMitia changed the title Enable scraping examples for dev-docs generation Enable nightly to have scraping examples for dev-docs generation Oct 15, 2023
@alice-i-cecile alice-i-cecile added the S-Blocked This cannot more forward until something else changes label Oct 16, 2023
@ShadowMitia ShadowMitia marked this pull request as draft October 24, 2023 17:42
@ShadowMitia ShadowMitia marked this pull request as ready for review January 7, 2024 12:55
@ShadowMitia
Copy link
Contributor Author

#2305 was merged, so this is now mergeable!

.github/workflows/docs.yml Outdated Show resolved Hide resolved
@mockersf mockersf removed the S-Blocked This cannot more forward until something else changes label Jan 7, 2024
Copy link
Member

@BD103 BD103 left a comment

Choose a reason for hiding this comment

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

This line needs to be changed to @nightly, or the CI will fail. See docs on action.

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

Edit: This may also let you remove the +nightly modifier, since it will be the only toolchain installed.

@ShadowMitia
Copy link
Contributor Author

@BD103 All done! Thanks!

@mockersf
Copy link
Member

mockersf commented Mar 4, 2024

done in #12223, sorry I forgot about this PR

@mockersf mockersf closed this Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Build-System Related to build systems or continuous integration C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants