Skip to content

Tracking Issue: Add rustc-guide to toolstate #59597

Closed
@mark-i-m

Description

@mark-i-m

(According to the plan in rust-lang-nursery/rust-toolstate#5)

cc @nikomatsakis @kennytm @Michael-F-Bryan

@kennytm Could you tag this with Help-Wanted?

Instructions

Background: We have a cool tool called toolstate which posts a message on PRs that break dependent crates (e.g. clippy). For example, it might generate a post like this. There is also a web portal: https://rust-lang-nursery.github.io/rust-toolstate/

Objective: Currently the rustc-guide is not tracked by toolstate, but we want it to be. This will help us detect when the compiler changes and the guide needs to be updated. However, some infrastructure work is needed for this to work.

Steps

  • Add mdbook and mdbook-linkcheck as dependencies for the rust-lang/rust build. These are used to build and check links in the rustc-guide repo.
    • TBH, I don't know how best to do this. We already use mdbook to build The Book and other things, but it's not clear to me how we make sure they are installed... (Perhaps @kennytm has ideas?)
  • Add an ./x.py test src/doc/rustc-guide command
    1. Create a new struct RustcGuide in src/bootstrap/test.rs.
    2. impl Step for RustcGuide to run mdbook build in src/doc/rustc-guide
    - Make sure that this test is not part of the standard build process or it will block PRs on the rust-lang/rust repo. IIUC, this can be done in the implementation of should_run and make_run in Step (see the documentation in src/bootstrap/builder.rs
    3. Update Builder::get_step_descriptions
    4. You may or may not need to do other stuff to wire things together... not sure. In the end, you should be able to do ./x.py test src/doc/rustc-guide to run the book build and linkchecker on the guide.
  • Update the toolstate config to add rustc-guide, as done here: https://github.com/rust-lang/rust/pull/59038/files

Feel free to ping me on this thread if you need help :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-help-wantedCall for participation: Help is requested to fix this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions