Uh oh!
There was an error while loading. Please reload this page.
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. |
nagisa
commented
Jun 12, 2017
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. |
est31
commented
Jun 12, 2017
I was assuming it was some form of |
est31
commented
Jun 13, 2017
Okay then ... cc @alexcrichton |
alexcrichton
commented
Jun 13, 2017
@bors: r=nagisa build system stuff all looks good to me! |
bors
commented
Jun 13, 2017
📌 Commit d0b3afa has been approved by |
bors
commented
Jun 14, 2017
☔ 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.
est31
commented
Jun 14, 2017
Rebased. re-r? @nagisa |
est31
commented
Jun 14, 2017
@bors p=1 due to hazard of breaking again. |
alexcrichton
commented
Jun 14, 2017
@bors: r=nagisa p=1 |
bors
commented
Jun 14, 2017
📌 Commit e69f908 has been approved by |
bors
commented
Jun 14, 2017
⌛ Testing commit e69f908 with merge 7336555... |
bors
commented
Jun 14, 2017
💔 Test failed - status-travis |
est31
commented
Jun 14, 2017
Seems like a legit issue. I'm investigating... |
est31
commented
Jun 14, 2017
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 |
bors
commented
Jun 14, 2017
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? @nagisaFixes#42454
est31
commented
Jun 14, 2017
Hmm, I've still got to learn how to use bors try... @bors try |
bors
commented
Jun 14, 2017
71cda1a to
b8b4babCompareest31
commented
Jun 15, 2017
Yeey it works! |
est31
commented
Jun 15, 2017
re-r? @nagisa |
nagisa
commented
Jun 15, 2017
@bors r+ |
bors
commented
Jun 15, 2017
📌 Commit 23bd80a has been approved by |
bors
commented
Jun 15, 2017
⌛ Testing commit 23bd80a with merge 552c58c... |
bors
commented
Jun 15, 2017
💔 Test failed - status-travis |
Mark-Simulacrum
commented
Jun 15, 2017
Failure looks legitimate. |
est31
commented
Jun 16, 2017
Okay. Travis passed now. I've squashed the fix commits. re-r? @nagisa |
nagisa
commented
Jun 16, 2017
@bors r+ |
bors
commented
Jun 16, 2017
📌 Commit b34ac5d has been approved by |
bors
commented
Jun 16, 2017
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? @nagisaFixes#42454
bors
commented
Jun 16, 2017
☀️ 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
$rustsrcis the root of the rust repo git checkout):$rustsrc/src/tools/unstable-book-genand then docargo run $rustsrc/src $rustsrc/src/doc/unstable-bookto put the stubs into the unstable book$rustsrcand rungit ls-files --others --exclude-standardto list the newly added stubsgit addit andgit commitgit --reset hardandgit clean -fOr they can do this:
src/tools/tidy/src/unstable_book.rsline 122./x.py test src/tools/tidyto 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