rustc-dev-guide
rustc-dev-guide copied to clipboard
Document that linkcheck only looks at modified files when running locally
when i run
RUST_LOG=trace mdbook build
I get:
2021-01-22 08:35:53 [WARN] (mdbook::renderer): Renderer command `../../ci/linkcheck.sh`
uses a path relative to the renderer output directory `/Users/azw/repos/rustc-dev-guide/book/linkcheck`. This was previously accepted, but has been deprecated. Relative executable paths should be relative to the book root.
Checking files changed in master...: src/about-this-guide.md src/contributing.md src/git.md
[2021-01-22T16:35:53Z DEBUG mdbook_linkcheck] Loading cache from /Users/azw/repos/rustc-dev-guide/book/linkcheck/cache.json
[2021-01-22T16:35:53Z INFO mdbook_linkcheck] Started the link checker
[2021-01-22T16:35:53Z DEBUG mdbook_linkcheck] Selected file: Some(["src/about-this-guide.md", "src/contributing.md", "src/git.md"])
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] Config {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] follow_web_links: true,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] traverse_parent_directories: false,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] exclude: [
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "crates\\.io",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: crates\.io,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "gcc\\.godbolt\\.org",[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: gcc\.godbolt\.org,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "youtube\\.com",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: youtube\.com,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "youtu\\.be",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: youtu\.be,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "dl\\.acm\\.org",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: dl\.acm\.org,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "cs\\.bgu\\.ac\\.il",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: cs\.bgu\.ac\.il,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "www\\.amazon\\.com",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: www\.amazon\.com,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "www\\.rustaceans\\.org",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: www\.rustaceans\.org,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] HashedRegex {
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] string: "play\\.rust-lang\\.org",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] re: play\.rust-lang\.org,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] },
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] ],
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] user_agent: "mdbook-linkcheck-0.7.2",
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] cache_timeout: 86400,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] warning_policy: Error,
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] http_headers: {},
[2021-01-22T16:35:53Z TRACE mdbook_linkcheck] }
[2021-01-22T16:35:53Z INFO mdbook_linkcheck] Scanning book for links
[2021-01-22T16:35:53Z INFO mdbook_linkcheck] Found 0 links (0 incomplete links)
[2021-01-22T16:35:53Z TRACE mio::sys::unix::kqueue] registering; token=Token(18446744073709551615); interests=Readable
[2021-01-22T16:35:53Z TRACE mio::poll] registering with poller
[2021-01-22T16:35:53Z DEBUG mdbook_linkcheck] Saving the cache to /Users/azw/repos/rustc-dev-guide/book/linkcheck/cache.json
[2021-01-22T16:35:53Z INFO mdbook_linkcheck] No broken links found
2021-01-22 08:35:53 [TRACE] (mdbook::renderer): ../../ci/linkcheck.sh exited with output: ExitStatus(ExitStatus(0))
which says it found no links in the book at all. Separately, when i manually run
RUST_LOG=trace mdbook-linkcheck -f src/git.md book
or RUST_LOG=trace ../../ci/linkcheck.s
it just hangs? Have I set up my local instance incorrectly? I think its very curious that it seems to be running the same thing
if I remove the command =
from the linkcheck section of the book.toml, linkcheck works, but I get the classic Server returned 429 Too Many Requests for
for github as well as some other interesting errors
when I run mdbook-linkcheck --standalone -f src/git.md book/
it also finds no links. It appears that mdbook uses stdin to communicate some context to renderers, perhaps that is broken in linkcheck.sh
@guswynn this is intentional, if we don't cache the changes then you always get 429. If you change a file, it should detect the change and look for dead links.
@guswynn is there any change you think we could make here? Otherwise I don't see much point in keeping the issue open. Maybe we should document this in the readme?
@jyn514 documenting how it works would be great!