-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
rustdoc: Go back to loading all external crates unconditionally #90489
Conversation
05348e6
to
158861a
Compare
Just a followup so we don't get confused later on: This PR doesn't fix that ICE; they seem to be different bugs. |
@jyn514 |
@petrochenkov given how many regressions this has caused, I don't particularly want to keep playing wack-a-mole with fixing the bugs. I'm fine with fixing the bugs in parallel, but I don't think we should be testing things "in-prod" as it were, we don't need to enable this until rustdoc's fundamental problems with crate loading are resolved (#83761). |
Which regressions? |
#84738 is the only one I know of, but lots of people have been hitting it, and it was hit the last time we tried to land this patch too.
Right, yes, this is what I mean, there's no guarantee that fixing one issue will fix the others, and it happens rarely enough that usually the bug doesn't get caught until the patch hits stable. And I'm not sure what benefit it brings, no one is using #68427 in practice. |
I just spent about half an hour to come up with the following impls for the visitor: fn visit_foreign_item(&mut self, item: &ast::ForeignItem) {
self.load_links_in_attrs(&item.attrs, item.span);
visit::walk_foreign_item(self, item)
}
// NOTE: if doc-comments are ever allowed on function parameters, this will have to implement `visit_param` too.
fn visit_assoc_item(&mut self, item: &ast::AssocItem, ctxt: visit::AssocCtxt) {
self.load_links_in_attrs(&item.attrs, item.span);
visit::walk_assoc_item(self, item, ctxt)
}
fn visit_field_def(&mut self, field: &ast::FieldDef) {
self.load_links_in_attrs(&field.attrs, field.span);
visit::walk_field_def(self, field)
}
fn visit_variant(&mut self, v: &ast::Variant) {
self.load_links_in_attrs(&v.attrs, v.span);
visit::walk_variant(self, v)
}
} finding #90610 in the process, and I'm still not sure I got them all. If you really think this is a good idea, I'd suggest adding a |
It's The only remaining potential source of missing extern crates that I'm aware of is reexport inlining. |
158861a
to
f017350
Compare
@bors r+ |
📌 Commit 51345a8 has been approved by |
…trochenkov rustdoc: Go back to loading all external crates unconditionally This *continues* to cause regressions. This code will be unnecessary once access to the resolver happens fully before creating the tyctxt (rust-lang#83761), so load all crates unconditionally for now. To minimize churn, this leaves in the code for loading crates selectively. "Fixes" rust-lang#84738. Previously: rust-lang#83738, rust-lang#85749, rust-lang#88215 r? `@petrochenkov` cc `@camelid` (this should fix the "index out of bounds" error you had while looking up `crate_name`).
backport suspended, waiting on #90489 (Zulip discussion) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (14a2fd6): comparison url. Summary: This change led to large relevant mixed results 🤷 in compiler performance.
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression |
[beta] backports - Fix assertion failures in OwnedHandle with windows_subsystem. rust-lang#88798 - Ensure that pushing empty path works as before on verbatim paths rust-lang#89665 - Feature gate + make must_not_suspend allow-by-default rust-lang#89826 - Only use clone3 when needed for pidfd rust-lang#89930 - Fix documentation header sizes rust-lang#90186 - Fixes incorrect handling of ADT's drop requirements rust-lang#90218 - Fix ICE when forgetting to Box a parameter to a Self::func call rust-lang#90221 - Prevent duplicate caller bounds candidates by exposing default substs in Unevaluated rust-lang#90266 - Update odht crate to 0.3.1 (big-endian bugfix) rust-lang#90403 - rustdoc: Go back to loading all external crates unconditionally rust-lang#90489 - Split doc_cfg and doc_auto_cfg features rust-lang#90502 - Apply adjustments for field expression even if inaccessible rust-lang#90508 - Warn for variables that are no longer captured rust-lang#90597 - Properly register text_direction_codepoint_in_comment lint. rust-lang#90626 - CI: Use ubuntu image to download openssl, curl sources, cacert.pem for x86 dist builds rust-lang#90457 - Android is not GNU rust-lang#90834 - Update llvm submodule rust-lang#90954 Additionally, this bumps the stage 0 compiler from beta to stable 1.56.1. r? `@Mark-Simulacrum`
This continues to cause regressions. This code will be unnecessary
once access to the resolver happens fully before creating the tyctxt
(#83761), so load all crates unconditionally for now. To minimize churn, this leaves in the code for loading crates selectively.
"Fixes" #84738. Previously: #83738, #85749, #88215
r? @petrochenkov cc @camelid (this should fix the "index out of bounds" error you had while looking up
crate_name
).