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

NotInSummary wrongly reported if -f option is used #86

Open
marxin opened this issue Jul 23, 2024 · 1 comment
Open

NotInSummary wrongly reported if -f option is used #86

marxin opened this issue Jul 23, 2024 · 1 comment

Comments

@marxin
Copy link

marxin commented Jul 23, 2024

I noticed that while debugging the https://rustc-dev-guide.rust-lang.org/ documentation that utilizes -f option for files modified against the master branch.

The problematic invocation:

❯ RUST_LOG=info ~/Programming/mdbook-linkcheck/target/debug/mdbook-linkcheck -f profile-guided-optimization.md -f SUMMARY.md -s 
[2024-07-23T15:46:06Z INFO  mdbook_linkcheck] Started the link checker
[2024-07-23T15:46:06Z INFO  mdbook_linkcheck] Scanning book for links
[2024-07-23T15:46:06Z INFO  mdbook_linkcheck] Found 9 links (0 incomplete links)
[src/validate.rs:86:22] file_names = [
    "profile-guided-optimization.md",
]
[src/validate.rs:95:13] resolved_link = "llvm-coverage-instrumentation.md"
[src/validate.rs:96:13] summary_path = "profile-guided-optimization.md"
error: It looks like "llvm-coverage-instrumentation.md" wasn't included in SUMMARY.md
   ┌─ profile-guided-optimization.md:52:1
   │
52 │ [`-C instrument-coverage`](./llvm-coverage-instrumentation.md), but using these
   │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ It looks like "llvm-coverage-instrumentation.md" wasn't included in SUMMARY.md

error: Server returned 404 Not Found for https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps
    ┌─ profile-guided-optimization.md:130:4
    │
130 │ in [run-make tests][rmake-tests] (the relevant tests have `pgo` in their name).
    │    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Server returned 404 Not Found for https://github.com/rust-lang/rust/tree/master/tests/run-make-fulldeps

[2024-07-23T15:46:06Z INFO  mdbook_linkcheck] 2 broken links found
Error: One or more incorrect links

The problem is that llvm-coverage-instrumentation.md is not included in file_names (contains only the filtered file) passed as argument to ensure_included_in_book. And thus the warning is triggered.

@camelid
Copy link
Contributor

camelid commented Aug 6, 2024

cc #77

camelid added a commit to xFrednet/rustc-dev-guide that referenced this issue Aug 6, 2024
See Michael-F-Bryan/mdbook-linkcheck#77
and Michael-F-Bryan/mdbook-linkcheck#86.

These bugs are causing linkcheck to erroneously fail because we run it
using `-f`, to avoid too many requests. For now, disable linkcheck in PR
CI, though leave it enabled in the cron job, where the bug should not
occur.
camelid added a commit to rust-lang/rustc-dev-guide that referenced this issue Aug 8, 2024
See Michael-F-Bryan/mdbook-linkcheck#77
and Michael-F-Bryan/mdbook-linkcheck#86.

These bugs are causing linkcheck to erroneously fail because we run it
using `-f`, to avoid too many requests. For now, disable linkcheck in PR
CI, though leave it enabled in the cron job, where the bug should not
occur.
marxin added a commit to marxin/mdbook-linkcheck that referenced this issue Aug 8, 2024
marxin added a commit to marxin/mdbook-linkcheck that referenced this issue Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants