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

Run linkchecker just on some docs? #76762

Open
RalfJung opened this issue Sep 15, 2020 · 2 comments
Open

Run linkchecker just on some docs? #76762

RalfJung opened this issue Sep 15, 2020 · 2 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@RalfJung
Copy link
Member

RalfJung commented Sep 15, 2020

I once again had a CI run fail due to a bad rustdoc link, and figured I'd try running that linkchecker locally. So I ran ./x.py test linkchecker --test-args library/alloc, realized it was building a full rustc (tidy seems to overwrite that default so maybe the linkchecker should, too? that sounds like #76371), added --stage 0, and still had to wait quite a bit while it built rustbook and "unstable-book-gen" and whatnot, none of which is needed to ensure that the liballoc docs do not have bad links. And then it still built a full rustc so I stopped, I guess I will have to rely on CI for this.

Is there any way to runst linkcheker on the docs for library/alloc without building rustc?

@ehuss
Copy link
Contributor

ehuss commented Sep 15, 2020

I think the short answer is "no". One of the issues is that the docs use relative links, so the linkchecker needs the other docs available to check that the target of the link exists.

I could try to do a simple fix for #76371 to avoid the second build of rustc, but at least one build of rustc is needed for the rustc book.

For me, with rustc already built, running the linkchecker takes about 2.5 minutes.

@jyn514 jyn514 added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) C-feature-request Category: A feature request, i.e: not implemented / a PR. labels Sep 15, 2020
@jyn514
Copy link
Member

jyn514 commented Sep 15, 2020

at least one build of rustc is needed for the rustc book.

If you had compiler-docs = false, would that still be necessary? Being able to run linkchecker with stage 0 seems useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

3 participants