-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Consider warning when intra-doc links fail on a cross-crate re-export #77200
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
See also my write-up in #77193 (comment): possibly we could make |
If your crate reexports an item, the reexport itself is part of your crate, so if there is a broken link in the documentation you added on it, we should definitely emit a warning. |
… r=jyn514,ollie27 Warn on broken intra-doc links added to cross-crate re-exports This emits `broken_intra_doc_links` for docs applied to pub use statements that point to external items and are inlined. Does not address rust-lang#77200 - any existing broken links from the original crate will not show warnings. r? `@jyn514`
Is it not possible to just resolve the issue by considering links in doc inherited via a re-export as being relative to the crate it was defined in? E.g. the doc in Edit: I guess this should be in a new issue maybe — but finding related issues on this repo is hard enough as it is. 🤷 |
(disclaimer: I'm the current maintainer of deadlinks.) cargo-deadlinks is not obsolete for a few reasons:
This is #74481 and is specific to facade crates. Other crates will break if you change the scope you resolve them in for re-exports, see #65983. |
Update intra-doc link documentation to match the implementation r? `@Manishearth` cc `@camelid` `@m-ou-se` Relevant PRs: - rust-lang#74489 - rust-lang#80181 - rust-lang#76078 - rust-lang#77519 - rust-lang#73101 Relevant issues: - rust-lang#78800 - rust-lang#77200 - rust-lang#77199 / rust-lang#54191 I haven't documented things that I consider 'just bugs', like rust-lang#77732, but I have documented features that aren't implemented, like rust-lang#78800.
I think it's pretty clear by now this won't happen - fortunately most of the bugs in rustdoc have been fixed. |
This is the exact opposite of #56922 😆
There have been a lot of silent failures popping up WRT cross-crate re-exports (#77193, #75855, #76106), and they're hard to notice because the failure is completely swallowed, you have to manually inspect the generated docs.
The rationale in #56922 was that
This is only true if the failure existed in the upstream crate. If it only appears on the re-export, it will fail completely silently for both the original crate and the current one. This is especially bad when you're adding additional docs on the re-export:
It could also appear for things outside of the control of the new crate, though: #75855
I think it also makes sense to warn for rustdoc bugs, since otherwise the user never knows to report them and we can't fix them.
@rust-lang/rustdoc what do you think?
cc @euclio
The text was updated successfully, but these errors were encountered: