-
Notifications
You must be signed in to change notification settings - Fork 198
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
Search does not complete #316
Comments
I wonder if it's a CDN thing... I've rebuilt the rocket docs, try reloading again. If it still doesn't work, can you check to see if you can load https://docs.rs/rocket/0.4.0/search-index.js? I want to make sure that you're seeing all the required files. |
Still the same issue. Have you seen, that the console gives me an TypeError?
Is there a way to get a non-minified version of |
That version of |
Thanks for the hint with the prettification! A french person has the same issue, a US person can see it just fine. It may really be a CDN issue here? Weird. Let's take these few lines of code They try to access it by |
If @GuillaumeGomez Do you also have this issue? I can't investigate what's going on because i'm not being served the faulty JS. |
Nope, works fine for me. Do you add something at the end of the end to be sure users' browsers reload it when needed? |
We don't add the resource suffix to the search index, just to the rustdoc static files. We don't touch any of the crate-specific files. The Rocket docs have been successfully built multiple times, so it's completely possible that an older version is being cached somewhere. |
Interesting enough curl gives me the correct file. My browser however doesn't. |
I'm getting a date from last month: I'm 90% sure this is a Cloudfront thing. Docs.rs is being hosted behind Cloudfront, and i bet they're caching the search index and haven't updated it after the docs got rebuilt. The problem now is, i don't know how to tell them to update their caches, either specifically for this file or generally whenever we rebuild any previously-successful docs. 😕 |
(Unrelated: it's funny that this hit on Rocket's docs, because Sergio would say that you should be using api.rocket.rs for hosted docs instead of docs.rs.) |
One could do the classic trick and append a unrelated query, e.g. |
Update: it looks like there's a similar issue with URLs that use a partial version number; see this example in tokio. It looks like the |
cc rust-lang/rust#59776 (comment) That PR suggests to start adding the resource suffix to the search index, which will sidestep the issue by making newer builds request a different URL for it. That will solve the Rocket issue, and this specific problem of However, i proposed a different solution in the linked comment: We should never serve docs on a URL that doesn't use an exact version number. Any URLs with a semver requirement instead of a version number should issue a redirect to the latest matching version. This solves the tokio issue by always requesting the newest version instead of sneakily changing However, now that i'm typing this up here, i see that that doesn't fix the Rocket problem, so maybe the complete solution is to do both this proposal and that PR. 🤔 |
Seems like similar or same problem happens with tokio now: https://docs.rs/tokio/0.1.18/tokio/ - search works browser console is full of
|
Running into this on the actix-web docs. This has a string in the version number ( |
Looks like these happens for all recent versions of crates, see also https://internals.rust-lang.org/t/docs-rs-search-is-broken/9906 , search in previous versions of the same crate works fine. |
The issues with recent crates' search indexes failing to load should be fixed by #329. |
#329 has been deployed, recent crates should be able to complete searches now. I'll post in the internals thread about what went wrong. |
it works for https://docs.rs/tokio/0.1.19/tokio/ |
I've just opened #342 to redirect version-catchall URLs to the full version number, which should fix this issue tokio had in #316 (comment), and close this issue entirely. |
https://docs.rs/rocket/0.4.0/rocket/?search=foobar gives me:
https://docs.rs/regex/1.1.2/regex/?search=foobar gives me:
The text was updated successfully, but these errors were encountered: