···6464 #[arg(long, value_name("PATH"), value_hint(clap::ValueHint::DirPath))]
6565 pub manifest_dir: Option<PathBuf>,
66666767- // TODO: warn on cache miss due to failed resolution
6867 /// Directory in which to persist build cache.
6968 ///
7069 /// Setting this will enable caching. Will skip rust-analyzer if cache hits.
+9
crates/mdbook-rustdoc-links/src/main.rs
···2222 cache::{Cache, FileCache},
2323 client::Client,
2424 env::{Config, Environment, RustAnalyzer},
2525+ link::diagnostic::LinkStatus,
2526 page::Pages,
2627 resolver::Resolver,
2728};
···143144 book.to_stdout(&ctx)?;
144145145146 env.config.fail_on_warnings.check(status.level())?;
147147+148148+ if env.config.cache_dir.is_some() && status == LinkStatus::Unresolved {
149149+ log::warn!(
150150+ "The `cache-dir` option is enabled, but some items were \
151151+ not resolved, which will cause rust-analyzer to always run \
152152+ despite the cache."
153153+ );
154154+ }
146155147156 Ok(())
148157}
···3636> patterns][specify-exclude-patterns] in the mdBook documentation.
3737>
3838> Items that fail to resolve are not included in the cache. If such "broken" links
3939-> persist in the Markdown source, cache will be invalidated on every run, and
3939+> persist in the Markdown source, cache will be invalidated on every build, and
4040> rust-analyzer will always run.
4141>
4242> **Do not** use your book's `build-dir` as the `cache-dir`: mdbook clears the output