-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Autogenerate stubs and SUMMARY.md in the unstable book #42612
Conversation
/cc @rust-lang/docs @rust-lang/compiler |
About the stubs removal, I think its better to track stubs outside of git, so that changes of the template affect all of them. Also, the methods listed above only work for stubs tracked outside of git, if you want to add docs for a feature when stubs are inside git you need to open docs one by one and check for stubs. If there is desire to put them into git though, I can put them back! I have done a new tool instead of adding this to tidy because I think that tidy shouldn't change anything, only read. Also, often you forget to run tidy so the speed bump issue would only be resolved partially, while this runs on every docs run. |
Okay, so I’m not sure how the unstable book generated/built/deployed, so I cannot r+ without checking what the people in-the-know say. All the other changes r=me. |
I was assuming it was some form of |
Okay then ... cc @alexcrichton |
@bors: r=nagisa build system stuff all looks good to me! |
📌 Commit d0b3afa has been approved by |
☔ The latest upstream changes (presumably #42644) made this pull request unmergeable. Please resolve the merge conflicts. |
Convert tidy into a library so that the data it creates can be used by external tools.
Rebased. re-r? @nagisa |
@bors p=1 due to hazard of breaking again. |
@bors: r=nagisa p=1 |
📌 Commit e69f908 has been approved by |
⌛ Testing commit e69f908 with merge 7336555... |
💔 Test failed - status-travis |
Seems like a legit issue.
I'm investigating... |
Hmm I couldn't reproduce locally, nor could I get fuchsia working... I have pushed a debug commit (don't merge the PR with that) to try it. @bors try |
Autogenerate stubs and SUMMARY.md in the unstable book Removes a speed bump in compiler development by autogenerating stubs for features in the unstable book. See #42454 for discussion. The PR contains three commits, separated in order to make review easy: * The first commit converts the tidy tool from a binary crate to a crate that contains both a library and a binary. In the second commit, we'll use the tidy library * The second and main commit introduces autogeneration of SUMMARY.md and feature stub files * The third commit turns off the tidy lint that checks for features without a stub, and removes the stub files. A separate commit due to the large number of files touched Members of the doc team who wish to document some features can either do this (where `$rustsrc` is the root of the rust repo git checkout): 1. cd to `$rustsrc/src/tools/unstable-book-gen` and then do `cargo run $rustsrc/src $rustsrc/src/doc/unstable-book` to put the stubs into the unstable book 2. cd to `$rustsrc` and run `git ls-files --others --exclude-standard` to list the newly added stubs 3. choose a file to edit, then `git add` it and `git commit` 4. afterwards, remove all changes by the tool by doing `git --reset hard` and `git clean -f` Or they can do this: 1. remove the comment marker in `src/tools/tidy/src/unstable_book.rs` line 122 2. run `./x.py test src/tools/tidy` to list the unstable features which only have stubs 3. revert the change in 1 3. document one of the chosen unstable features The changes done by this PR also allow for further development: * tidy obtains information about tracking issues. We can now forbid differing tracking issues between differing `#![unstable]` annotations. I haven't done this but plan to in a future PR * we now have a general framework for generating stuff for the unstable book at build time. Further changes can autogenerate a list of the API a given library feature exposes. r? @nagisa Fixes #42454
Hmm, I've still got to learn how to use bors try... @bors try |
71cda1a
to
b8b4bab
Compare
Yeey it works! |
re-r? @nagisa |
@bors r+ |
📌 Commit 23bd80a has been approved by |
⌛ Testing commit 23bd80a with merge 552c58c... |
💔 Test failed - status-travis |
Failure looks legitimate.
|
Okay. Travis passed now. I've squashed the fix commits. re-r? @nagisa |
@bors r+ |
📌 Commit b34ac5d has been approved by |
Autogenerate stubs and SUMMARY.md in the unstable book Removes a speed bump in compiler development by autogenerating stubs for features in the unstable book. See #42454 for discussion. The PR contains three commits, separated in order to make review easy: * The first commit converts the tidy tool from a binary crate to a crate that contains both a library and a binary. In the second commit, we'll use the tidy library * The second and main commit introduces autogeneration of SUMMARY.md and feature stub files * The third commit turns off the tidy lint that checks for features without a stub, and removes the stub files. A separate commit due to the large number of files touched Members of the doc team who wish to document some features can either do this (where `$rustsrc` is the root of the rust repo git checkout): 1. cd to `$rustsrc/src/tools/unstable-book-gen` and then do `cargo run $rustsrc/src $rustsrc/src/doc/unstable-book` to put the stubs into the unstable book 2. cd to `$rustsrc` and run `git ls-files --others --exclude-standard` to list the newly added stubs 3. choose a file to edit, then `git add` it and `git commit` 4. afterwards, remove all changes by the tool by doing `git --reset hard` and `git clean -f` Or they can do this: 1. remove the comment marker in `src/tools/tidy/src/unstable_book.rs` line 122 2. run `./x.py test src/tools/tidy` to list the unstable features which only have stubs 3. revert the change in 1 3. document one of the chosen unstable features The changes done by this PR also allow for further development: * tidy obtains information about tracking issues. We can now forbid differing tracking issues between differing `#![unstable]` annotations. I haven't done this but plan to in a future PR * we now have a general framework for generating stuff for the unstable book at build time. Further changes can autogenerate a list of the API a given library feature exposes. The old way to simply click through the documentation after it has been uploaded to rust-lang.org works as well. r? @nagisa Fixes #42454
☀️ Test successful - status-appveyor, status-travis |
Its being autogenerated now, as of PR rust-lang#42612. It seems I forgot to remove it.
Remove SUMMARY.md of the unstable book as its autogenerated Its being autogenerated now, as of PR #42612. It seems I forgot to remove it. Also, sort the entries of SUMMARY.md alphabetically.
Removes a speed bump in compiler development by autogenerating stubs for features in the unstable book. See #42454 for discussion.
The PR contains three commits, separated in order to make review easy:
Members of the doc team who wish to document some features can either do this (where
$rustsrc
is the root of the rust repo git checkout):$rustsrc/src/tools/unstable-book-gen
and then docargo run $rustsrc/src $rustsrc/src/doc/unstable-book
to put the stubs into the unstable book$rustsrc
and rungit ls-files --others --exclude-standard
to list the newly added stubsgit add
it andgit commit
git --reset hard
andgit clean -f
Or they can do this:
src/tools/tidy/src/unstable_book.rs
line 122./x.py test src/tools/tidy
to list the unstable features which only have stubsThe changes done by this PR also allow for further development:
#![unstable]
annotations. I haven't done this but plan to in a future PRThe old way to simply click through the documentation after it has been uploaded to rust-lang.org works as well.
r? @nagisa
Fixes #42454